{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "observe",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        },
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "observe",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "keepTop",
      "signature": "const keepTop = function keepTop(heap: readonly [number, number][], entry: [number, number]): [number, number][] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "result",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "outliersOf",
      "signature": "const outliersOf = function outliersOf("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "keepTop",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        },
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "keepTop",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "method_definition",
      "line": 127,
      "name": "observe",
      "signature": "private observe(raw: unknown): void {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/selectors/record.selector.ts",
          "name": "foldRecords",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-selectors-record-selector-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/selectors/record.selector.ts",
            "label": "core/selectors/record.selector.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/selectors/record.selector.ts.md",
            "ref": "anatomy:file-patterns-core-selectors-record-selector-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "method_definition",
      "line": 84,
      "name": "update",
      "signature": "public update(chunk: readonly unknown[]): void {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/math.converter.ts",
          "name": "gaussian",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-converters-math-converter-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/converters/math.converter.ts",
            "label": "core/converters/math.converter.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/converters/math.converter.ts.md",
            "ref": "anatomy:file-patterns-core-converters-math-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "method_definition",
      "line": 90,
      "name": "sample",
      "signature": "public sample(rng: Rng): number | null {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/aggregators/representation.vector.aggregator.ts",
          "name": "outliersOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.vector.aggregator.ts",
            "label": "core/aggregators/representation.vector.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "method_definition",
      "line": 98,
      "name": "result",
      "signature": "public result(limit = DEFAULT_LIMIT): VectorSummary {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "ANOMALY_K",
      "signature": "const ANOMALY_K = 16;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 7,
      "name": "DEFAULT_LIMIT",
      "signature": "const DEFAULT_LIMIT = 10;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "asNumber",
      "signature": "const asNumber = function asNumber(value: unknown): number | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "next",
      "signature": "const next = [...heap, entry];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "drop",
      "signature": "const drop = next.reduce((minIndex, candidate, index) => {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "current",
      "signature": "const current = next[minIndex];"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "collectIndices",
      "signature": "const collectIndices = function collectIndices("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 35,
      "name": "indexOf",
      "signature": "const indexOf = new Map<number, number>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 54,
      "name": "{ mean, stddev, limit }",
      "signature": "const { mean, stddev, limit } = context;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 58,
      "name": "scored",
      "signature": "const scored = [...collectIndices(low, high).entries()].map(([value, index]): [number, number, number] => ["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "class_declaration",
      "line": 66,
      "name": "VectorAccumulator",
      "signature": "export class VectorAccumulator {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 67,
      "name": "field",
      "signature": "private readonly field: string;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 68,
      "name": "low",
      "signature": "private low: [number, number][] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 69,
      "name": "high",
      "signature": "private high: [number, number][] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 70,
      "name": "count",
      "signature": "private count = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 71,
      "name": "seen",
      "signature": "private seen = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 72,
      "name": "sum",
      "signature": "private sum = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 73,
      "name": "sumsq",
      "signature": "private sumsq = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 74,
      "name": "minimum",
      "signature": "private minimum = Infinity;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 75,
      "name": "maximum",
      "signature": "private maximum = -Infinity;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 76,
      "name": "prev",
      "signature": "private prev: number | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 77,
      "name": "cross",
      "signature": "private cross = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "public_field_definition",
      "line": 78,
      "name": "consecutive",
      "signature": "private consecutive = 0;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 80,
      "name": "constructor",
      "signature": "public constructor(field: string) {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "[mean, variance]",
      "signature": "const [mean, variance] = this.meanVariance();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "stddev",
      "signature": "const stddev = Math.sqrt(variance);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 113,
      "name": "autocorrelation",
      "signature": "const autocorrelation ="
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 128,
      "name": "index",
      "signature": "const index = this.seen;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 130,
      "name": "number",
      "signature": "const number = asNumber(raw);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 139,
      "name": "accumulate",
      "signature": "private accumulate(number: number): void {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "method_definition",
      "line": 152,
      "name": "meanVariance",
      "signature": "private meanVariance(): [number, number] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 153,
      "name": "mean",
      "signature": "const mean = this.sum / this.count;"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-vector-aggregator-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "representation.vector.aggregator.ts",
  "path": "core/aggregators/representation.vector.aggregator.ts",
  "ref": "anatomy:file-patterns-core-aggregators-representation-vector-aggregator-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-aggregators.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-aggregators"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-converters-math-converter-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/converters/math.converter.ts",
          "label": "core/converters/math.converter.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/converters/math.converter.ts.md",
          "ref": "anatomy:file-patterns-core-converters-math-converter-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-selectors-record-selector-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/selectors/record.selector.ts",
          "label": "core/selectors/record.selector.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/selectors/record.selector.ts.md",
          "ref": "anatomy:file-patterns-core-selectors-record-selector-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-aggregators.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-aggregators"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-converters",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-converters.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-converters"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-selectors",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-selectors",
          "label": "core/selectors",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-selectors.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-selectors"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "aggregator",
    "subject": "representation",
    "variant": "vector"
  },
  "stats": {
    "bytes": 4885,
    "callable": 11,
    "definitions": 38,
    "edges": 5,
    "exported": 26,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 2,
      "entry": 4,
      "isolated": 32
    },
    "lines": {
      "blank": 13,
      "code": 143,
      "total": 156
    }
  },
  "summary": "143 lines of code and 38 definitions.",
  "text": "https://banes-lab.com/source/patterns/core/aggregators/representation.vector.aggregator.ts.txt",
  "tree": "patterns",
  "siblings": {
    "next": null,
    "previous": {
      "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-tree-aggregator-ts",
      "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.tree.aggregator.ts",
      "label": "core/aggregators/representation.tree.aggregator.ts",
      "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.tree.aggregator.ts.md",
      "ref": "anatomy:file-patterns-core-aggregators-representation-tree-aggregator-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/patterns/core/aggregators",
    "label": "core/aggregators",
    "markdown": "https://banes-lab.com/api/source/patterns/core/aggregators.md",
    "ref": "api:source/patterns/core/aggregators"
  }
}
