{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "Aggregate",
 "ref": "Aggregate#bb80",
 "hash": "sema:Aggregate#mh:SHA-256:bb809289d74615fd774f32704d3857a5e4d45480ad5b68de8f995e0c9e445d21",
 "stub": "bb80",
 "layer": "Infrastructure",
 "type": "Primitives",
 "summary": "Reduce a set to a summary statistic",
 "mechanism": "A deterministic function that maps a Vector#4268 of inputs to a single Scalar Value#37fd. Implements standard statistical operations (Mean, Mode, Median) to compress signal bandwidth. When the caller supplies Vector#4268 alongside the vector, the reduction becomes a weighted one. It serves as the computational backbone for consensus mechanisms.",
 "invariants": [
  "Determinism: F(Input) always yields the same Output.",
  "Yields one scalar Value#37fd whatever the input length, including length one."
 ],
 "parameters": [
  {
   "name": "function",
   "type": "Enum",
   "range": "{Mean, Median, Mode, Sum, Min, Max, Variance, StdDev}",
   "description": "Default: Mean"
  }
 ],
 "signature": [],
 "preconditions": [
  "All elements in list share a comparable type",
  "Input list is non-empty"
 ],
 "postconditions": [
  "Single summary value returned"
 ],
 "failure_modes": [
  "Type Mismatch: Input list contains incomparable types (e.g., Integers mixed with Strings).",
  "Empty Set: Attempting to aggregate a list with length 0 (Undefined for Mean/Mode#29d3).",
  "Overflow: Sum of inputs exceeds maximum integer size (if strictly typed)."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "Aggregate",
 "builds_on": [
  {
   "alias": "mode",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Mode",
   "ref": "Mode#29d3",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Mode"
  },
  {
   "alias": "value",
   "relation": "yields",
   "library": "bootstrap",
   "slug": "Value",
   "ref": "Value#37fd",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Value"
  },
  {
   "alias": "vector",
   "relation": "accepts",
   "library": "bootstrap",
   "slug": "Vector",
   "ref": "Vector#4268",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Vector"
  }
 ],
 "related": [],
 "used_by": [
  {
   "slug": "ChunkMerge",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ChunkMerge"
  },
  {
   "slug": "DriftWatch",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/DriftWatch"
  },
  {
   "slug": "Parallelize",
   "relation": "composes_with",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Parallelize"
  },
  {
   "slug": "PerspectiveEnsemble",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/PerspectiveEnsemble"
  },
  {
   "slug": "SelfConsistency",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/SelfConsistency"
  },
  {
   "slug": "Vote",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Vote"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/Aggregate",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/Aggregate.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
