# configuration/constants/math.constants.ts

> 34 lines of code and 12 definitions.

Tree: GovLab Patterns
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/patterns#file-patterns-configuration-constants-math-constants-ts
Source text: https://banes-lab.com/source/patterns/configuration/constants/math.constants.ts.txt

Listed in [configuration/constants](https://banes-lab.com/api/source/patterns/configuration/constants.md), after [configuration/constants/invocation.constants.ts](https://banes-lab.com/source/patterns/configuration/constants/invocation.constants.ts.md) and before [configuration/constants/report.constants.ts](https://banes-lab.com/source/patterns/configuration/constants/report.constants.ts.md).

## Definitions

- `LOGIC` (lexical_declaration, line 4)
- `GRAPH` (lexical_declaration, line 5)
- `ALGEBRA` (lexical_declaration, line 6)
- `ANALYSIS` (lexical_declaration, line 7)
- `OPTIMIZATION` (lexical_declaration, line 8)
- `TOPOLOGY` (lexical_declaration, line 9)
- `PROBABILITY` (lexical_declaration, line 10)
- `INFORMATION_THEORY` (lexical_declaration, line 11)
- `DYNAMICAL_SYSTEMS` (lexical_declaration, line 12)
- `MATH_TYPES` (lexical_declaration, line 14, exported)
- `ANALYSIS_MATH_TYPE` (lexical_declaration, line 16, exported)
- `ROUNDING` (lexical_declaration, line 38, exported)

## Contained in

- [configuration/constants](https://banes-lab.com/anatomy/patterns/folder-patterns-configuration-constants.md)

## Source

```typescript
import type { AnalysisTag, MathType } from "#types/axis.types";
import { MATH_TYPE_AXIS } from "#configuration/generated/axis.generated";

const LOGIC = "logic";
const GRAPH = "graph";
const ALGEBRA = "algebra";
const ANALYSIS = "analysis";
const OPTIMIZATION = "optimization";
const TOPOLOGY = "topology";
const PROBABILITY = "probability";
const INFORMATION_THEORY = "information-theory";
const DYNAMICAL_SYSTEMS = "dynamical-systems";

export const MATH_TYPES: ReadonlySet<string> = new Set(MATH_TYPE_AXIS);

export const ANALYSIS_MATH_TYPE: Readonly<Record<AnalysisTag, MathType>> = {
    anomaly: PROBABILITY,
    behavior: DYNAMICAL_SYSTEMS,
    cause: LOGIC,
    change: DYNAMICAL_SYSTEMS,
    complexity: INFORMATION_THEORY,
    fractal: TOPOLOGY,
    frequency: PROBABILITY,
    function: ANALYSIS,
    invariant: TOPOLOGY,
    meaning: LOGIC,
    optimization: OPTIMIZATION,
    prediction: PROBABILITY,
    relation: GRAPH,
    sequential: DYNAMICAL_SYSTEMS,
    space: TOPOLOGY,
    statistical: PROBABILITY,
    structure: ALGEBRA,
    time: DYNAMICAL_SYSTEMS,
    transformation: ANALYSIS,
};

export const ROUNDING = { coarse: 1, fine: 4, standard: 2 } as const;
```
