# jiggzson/nerdamer architecture

> Architecture diagram of the GitHub repository jiggzson/nerdamer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jiggzson/nerdamer
- Repository: https://github.com/jiggzson/nerdamer

## Overview

Nerdamer is a JavaScript/TypeScript symbolic mathematics library and computer algebra system. A user submits notation through the callable API or parser entry point; parsing produces symbolic expressions, equations, or structured entities, which can then be transformed by algebra, calculus, and solving operations and rendered as text or TeX. The README documents these public capabilities; the source index and excerpts support the parser, core entity, and selected internal relationships. Many domain implementations were not sampled, so their internal call paths are not asserted.

Main entry points: [`src/index.ts`](https://github.com/jiggzson/nerdamer/blob/master/src/index.ts) (Full API), [`src/core/classes/parser/Parser.ts`](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/parser/Parser.ts) (Notation parser), [`src/core/classes/expression/Expression.ts`](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/expression/Expression.ts) (Expressions), [`src/math/index.ts`](https://github.com/jiggzson/nerdamer/blob/master/src/math/index.ts) (Math functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["API entry points"]
  node_fullapi["Full API<br/>[index.ts]"]
  node_parserapi["Parser API<br/>[parser.ts]"]
end

subgraph group_core["Symbolic core"]
  node_parser["Notation parser<br/>[Parser.ts]"]
  node_dispatch["Function dispatch<br/>[dispatch.ts]"]
  node_expression["Expressions<br/>[Expression.ts]"]
  node_rational["Rationals<br/>[Rational.ts]"]
  node_mathfunctions["Math functions<br/>[index.ts]"]
  node_format["Text and TeX<br/>[Converter.ts]"]
end

subgraph group_math["Math domains"]
  node_algebra["Algebra<br/>[algebra.ts]"]
  node_calculus["Calculus<br/>[calculus.ts]"]
  node_solver["Equation solving<br/>[solve.ts]"]
  node_statistics["Statistics<br/>[statistics.ts]"]
  node_special["Special functions<br/>[index.ts]"]
end

subgraph group_entities["Structures and extensions"]
  node_assumptions["Assumptions<br/>[assume.ts]"]
  node_scripting["Symbolic scripting<br/>[evaluate.ts]"]
  node_equation["Equations<br/>[Equation.ts]"]
  node_matrix["Matrices<br/>[Matrix.ts]"]
  node_vector["Vectors<br/>[Vector.ts]"]
  node_polynomial["Polynomials<br/>[Polynomial.ts]"]
  node_valueset["Value sets<br/>[ValuesSet.ts]"]
  node_dictionary["Dictionaries<br/>[Dictionary.ts]"]
end

node_user(("Library user"))

node_user -->|"submits notation"| node_fullapi
node_user -->|"parses notation"| node_parserapi
node_fullapi -->|"assembles parser"| node_parser
node_parserapi -->|"calls parser"| node_parser
node_parser -->|"produces entities"| node_expression
node_parser -->|"produces equations"| node_equation
node_parser -->|"builds vectors"| node_vector
node_parser -->|"builds dictionaries"| node_dictionary
node_expression -->|"parses input"| node_parser
node_expression -->|"uses functions"| node_mathfunctions
node_mathfunctions -->|"checks assumptions"| node_assumptions
node_mathfunctions -.->|"uses rationals"| node_rational
node_fullapi -->|"exposes algebra"| node_algebra
node_fullapi -->|"exposes calculus"| node_calculus
node_fullapi -->|"exposes solving"| node_solver
node_fullapi -->|"exposes statistics"| node_statistics
node_fullapi -->|"exposes special functions"| node_special
node_fullapi -->|"exposes assumptions"| node_assumptions
node_fullapi -->|"registers scripting"| node_scripting
node_fullapi -->|"exposes structures"| node_matrix
node_fullapi -->|"provides conversion"| node_format
node_algebra -.->|"polynomial operations"| node_polynomial
node_solver -->|"solves equations"| node_equation
node_solver -->|"returns solutions"| node_valueset
node_matrix -->|"uses vectors"| node_vector
node_user -->|"requests output"| node_format

click node_fullapi "https://github.com/jiggzson/nerdamer/blob/master/src/index.ts"
click node_parserapi "https://github.com/jiggzson/nerdamer/blob/master/src/api/parser.ts"
click node_parser "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/parser/Parser.ts"
click node_dispatch "https://github.com/jiggzson/nerdamer/blob/master/src/core/dispatch.ts"
click node_expression "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/expression/Expression.ts"
click node_rational "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/rational/Rational.ts"
click node_mathfunctions "https://github.com/jiggzson/nerdamer/blob/master/src/math/index.ts"
click node_format "https://github.com/jiggzson/nerdamer/blob/master/src/core/converters/Converter.ts"
click node_algebra "https://github.com/jiggzson/nerdamer/blob/master/src/api/algebra.ts"
click node_calculus "https://github.com/jiggzson/nerdamer/blob/master/src/api/calculus.ts"
click node_solver "https://github.com/jiggzson/nerdamer/blob/master/src/solve/solve.ts"
click node_statistics "https://github.com/jiggzson/nerdamer/blob/master/src/statistics/statistics.ts"
click node_special "https://github.com/jiggzson/nerdamer/blob/master/src/special/index.ts"
click node_assumptions "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/assumption/assume.ts"
click node_scripting "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/parser/scripting/evaluate.ts"
click node_equation "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/equation/Equation.ts"
click node_matrix "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/matrix/Matrix.ts"
click node_vector "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/vector/Vector.ts"
click node_polynomial "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/polynomial/Polynomial.ts"
click node_valueset "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/valuesSet/ValuesSet.ts"
click node_dictionary "https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/dictionary/Dictionary.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fullapi,node_parserapi,node_user toneBlue
class node_parser,node_dispatch,node_expression,node_rational,node_mathfunctions,node_format toneAmber
class node_algebra,node_calculus,node_solver,node_statistics,node_special toneMint
class node_assumptions,node_scripting,node_equation,node_matrix,node_vector,node_polynomial,node_valueset,node_dictionary toneRose
```

## Components

### API entry points

- [Full API](https://github.com/jiggzson/nerdamer/blob/master/src/index.ts): `src/index.ts`
- [Parser API](https://github.com/jiggzson/nerdamer/blob/master/src/api/parser.ts): `src/api/parser.ts`

### Symbolic core

- [Notation parser](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/parser/Parser.ts): `src/core/classes/parser/Parser.ts`
- [Function dispatch](https://github.com/jiggzson/nerdamer/blob/master/src/core/dispatch.ts): `src/core/dispatch.ts`
- [Expressions](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/expression/Expression.ts): `src/core/classes/expression/Expression.ts`
- [Rationals](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/rational/Rational.ts): `src/core/classes/rational/Rational.ts`
- [Math functions](https://github.com/jiggzson/nerdamer/blob/master/src/math/index.ts): `src/math/index.ts`
- [Text and TeX](https://github.com/jiggzson/nerdamer/blob/master/src/core/converters/Converter.ts): `src/core/converters/Converter.ts`

### Math domains

- [Algebra](https://github.com/jiggzson/nerdamer/blob/master/src/api/algebra.ts): `src/api/algebra.ts`
- [Calculus](https://github.com/jiggzson/nerdamer/blob/master/src/api/calculus.ts): `src/api/calculus.ts`
- [Equation solving](https://github.com/jiggzson/nerdamer/blob/master/src/solve/solve.ts): `src/solve/solve.ts`
- [Statistics](https://github.com/jiggzson/nerdamer/blob/master/src/statistics/statistics.ts): `src/statistics/statistics.ts`
- [Special functions](https://github.com/jiggzson/nerdamer/blob/master/src/special/index.ts): `src/special/index.ts`

### Structures and extensions

- [Assumptions](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/assumption/assume.ts): `src/core/classes/assumption/assume.ts`
- [Symbolic scripting](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/parser/scripting/evaluate.ts): `src/core/classes/parser/scripting/evaluate.ts`
- [Equations](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/equation/Equation.ts): `src/core/classes/equation/Equation.ts`
- [Matrices](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/matrix/Matrix.ts): `src/core/classes/matrix/Matrix.ts`
- [Vectors](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/vector/Vector.ts): `src/core/classes/vector/Vector.ts`
- [Polynomials](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/polynomial/Polynomial.ts): `src/core/classes/polynomial/Polynomial.ts`
- [Value sets](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/valuesSet/ValuesSet.ts): `src/core/classes/valuesSet/ValuesSet.ts`
- [Dictionaries](https://github.com/jiggzson/nerdamer/blob/master/src/core/classes/dictionary/Dictionary.ts): `src/core/classes/dictionary/Dictionary.ts`

### Other components

- **Library user**

## Connections

- Library user → Full API: submits notation
- Library user → Parser API: parses notation
- Full API → Notation parser: assembles parser (evidence: `src/index.ts`)
- Parser API → Notation parser: calls parser (evidence: `src/api/parser.ts`)
- Notation parser → Expressions: produces entities (evidence: `src/core/classes/parser/Parser.ts`)
- Notation parser → Equations: produces equations (evidence: `src/core/classes/parser/Parser.ts`)
- Notation parser → Vectors: builds vectors (evidence: `src/core/classes/parser/Parser.ts`)
- Notation parser → Dictionaries: builds dictionaries (evidence: `src/core/classes/parser/Parser.ts`)
- Expressions → Notation parser: parses input (evidence: `src/core/classes/expression/Expression.ts`)
- Expressions → Math functions: uses functions (evidence: `src/core/classes/expression/Expression.ts`)
- Math functions → Assumptions: checks assumptions (evidence: `src/math/index.ts`)
- Math functions → Rationals: uses rationals (evidence: `src/math/index.ts`)
- Full API → Algebra: exposes algebra (evidence: `src/index.ts`)
- Full API → Calculus: exposes calculus (evidence: `src/index.ts`)
- Full API → Equation solving: exposes solving (evidence: `src/index.ts`)
- Full API → Statistics: exposes statistics (evidence: `src/index.ts`)
- Full API → Special functions: exposes special functions (evidence: `src/index.ts`)
- Full API → Assumptions: exposes assumptions (evidence: `src/index.ts`)
- Full API → Symbolic scripting: registers scripting
- Full API → Matrices: exposes structures (evidence: `src/index.ts`)
- Full API → Text and TeX: provides conversion (evidence: `src/index.ts`)
- Algebra → Polynomials: polynomial operations
- Equation solving → Equations: solves equations (evidence: `src/solve/solve.ts`)
- Equation solving → Value sets: returns solutions
- Matrices → Vectors: uses vectors (evidence: `src/core/classes/matrix/Matrix.ts`)
- Library user → Text and TeX: requests output
