# infarh/mathcore architecture

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

- Interactive diagram: https://gitdiagram.com/infarh/mathcore
- Repository: https://github.com/infarh/mathcore

## Overview

MathCore is a broad .NET library of applied algorithms and developer utilities rather than a single end-user application. Consumers call its independent facilities directly: parse and query CSV data, process command arguments, resolve registered services, parse mathematical expressions, or use numerical, collection, and data-query algorithms. The tree and README support these capability areas, but do not establish one unified runtime pipeline. Edges below are limited to relationships shown by excerpts or SOURCE INDEX references; several large subsystems are represented at directory level because their internals were not sampled.

Main entry points: [`MathCore/CSV/CSVQuery.cs`](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVQuery.cs) (CSV Query), [`MathCore/IoC/ServiceManager.cs`](https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/ServiceManager.cs) (Service Manager), [`MathCore/CSV/Value.cs`](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/Value.cs) (CSV Values), [`MathCore/CommandProcessor`](https://github.com/infarh/mathcore/tree/dev/MathCore/CommandProcessor) (Command Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_io["Input And Data"]
  node_csv_query["CSV Query<br/>[CSVQuery.cs]"]
  node_csv_parser["CSV Parser<br/>[CSVParser.cs]"]
  node_csv_row["CSV Rows<br/>[CSVQueryRow.cs]"]
  node_csv_value["CSV Values<br/>[Value.cs]"]
  node_commands["Command Processing"]
  node_repository["Paged Repository<br/>[Repository.cs]"]
  node_query_options["Paged Query Options<br/>[QueryOptions.cs]"]
  node_query_results["Query Results<br/>[QueryResult.cs]"]
end

subgraph group_math["Math And Numerics"]
  node_bigint["Big Integers<br/>[BigInt.Core.cs]"]
  node_complex["Complex Numbers<br/>[Complex.cs]"]
  node_matrices["Matrices<br/>[Matrix.cs]"]
  node_vectors["Vectors<br/>[Vector2D.cs]"]
  node_interpolation["Interpolation"]
  node_differential["Differential Equations"]
  node_function["Differentiable Functions<br/>[Function.cs]"]
end

subgraph group_services["Services And Events"]
  node_ioc_manager["Service Manager<br/>[ServiceManager.cs]"]
  node_ioc_registration["Service Registration"]
  node_ioc_mapping["Service Mapping"]
  node_event_args["Typed Event Data<br/>[EventArgs.cs]"]
  node_event_handlers["Event Delegates<br/>[EventHandler.cs]"]
end

subgraph group_query["Expression And Query"]
  node_parser["Math Expression Parser"]
  node_expression_nodes["Expression Tree Nodes"]
  node_expression_tools["Expression Visitors"]
  node_xpath["XPath Query Builder<br/>[QueryBuilder1.cs]"]
end

subgraph group_utilities["General Utilities"]
  node_extensions["Extensions And Async"]
  node_hashing["Hash Algorithms"]
  node_json["JSON Support"]
  node_logging["Logging"]
end

node_consumer(("Library Consumer"))

node_consumer -.->|"queries CSV"| node_csv_query
node_csv_query -->|"parses lines"| node_csv_parser
node_csv_query -->|"yields rows"| node_csv_row
node_csv_row -->|"wraps values"| node_csv_value
node_commands -->|"uses conversions"| node_csv_value
node_commands -->|"references values"| node_csv_value
node_parser -->|"builds nodes"| node_expression_nodes
node_parser -->|"uses functions"| node_function
node_xpath -->|"uses functions"| node_function
node_ioc_manager -->|"creates instances"| node_ioc_registration
node_ioc_manager -->|"maps services"| node_ioc_mapping
node_ioc_registration -->|"resolves dependencies"| node_ioc_manager
node_event_handlers -->|"uses arguments"| node_event_args
node_query_results -->|"uses options"| node_query_options

click node_csv_query "https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVQuery.cs"
click node_csv_parser "https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVParser.cs"
click node_csv_row "https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVQueryRow.cs"
click node_csv_value "https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/Value.cs"
click node_commands "https://github.com/infarh/mathcore/tree/dev/MathCore/CommandProcessor"
click node_repository "https://github.com/infarh/mathcore/blob/dev/MathCore/Collections/Repository.cs"
click node_query_options "https://github.com/infarh/mathcore/blob/dev/MathCore/Queries/QueryOptions.cs"
click node_query_results "https://github.com/infarh/mathcore/blob/dev/MathCore/Queries/QueryResult.cs"
click node_bigint "https://github.com/infarh/mathcore/blob/dev/MathCore/BigInt.Core.cs"
click node_complex "https://github.com/infarh/mathcore/blob/dev/MathCore/Complex.cs"
click node_matrices "https://github.com/infarh/mathcore/blob/dev/MathCore/Matrix.cs"
click node_vectors "https://github.com/infarh/mathcore/blob/dev/MathCore/Vectors/Vector2D.cs"
click node_interpolation "https://github.com/infarh/mathcore/tree/dev/MathCore/Interpolation"
click node_differential "https://github.com/infarh/mathcore/tree/dev/MathCore/DifferentialEquations/Numerical"
click node_function "https://github.com/infarh/mathcore/blob/dev/MathCore/Functions/Differentiable/Function.cs"
click node_parser "https://github.com/infarh/mathcore/blob/dev/MathCore/MathParser/ExpressionParser.cs"
click node_expression_nodes "https://github.com/infarh/mathcore/tree/dev/MathCore/MathParser/ExpressionTrees/Nodes"
click node_expression_tools "https://github.com/infarh/mathcore/tree/dev/MathCore/Expressions"
click node_xpath "https://github.com/infarh/mathcore/blob/dev/MathCore/Xml/XPath/QueryBuilder1.cs"
click node_ioc_manager "https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/ServiceManager.cs"
click node_ioc_registration "https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/ServiceRegistrations/ServiceRegistration.cs"
click node_ioc_mapping "https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/MapServiceRegistration.cs"
click node_event_args "https://github.com/infarh/mathcore/blob/dev/MathCore/EventArgs.cs"
click node_event_handlers "https://github.com/infarh/mathcore/blob/dev/MathCore/EventHandler.cs"
click node_extensions "https://github.com/infarh/mathcore/tree/dev/MathCore/Extensions"
click node_hashing "https://github.com/infarh/mathcore/tree/dev/MathCore/Hash"
click node_json "https://github.com/infarh/mathcore/tree/dev/MathCore/JSON"
click node_logging "https://github.com/infarh/mathcore/tree/dev/MathCore/Logging"

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_csv_query,node_csv_parser,node_csv_row,node_csv_value,node_commands,node_repository,node_query_options,node_query_results toneBlue
class node_bigint,node_complex,node_matrices,node_vectors,node_interpolation,node_differential,node_function toneAmber
class node_ioc_manager,node_ioc_registration,node_ioc_mapping,node_event_args,node_event_handlers toneMint
class node_parser,node_expression_nodes,node_expression_tools,node_xpath toneRose
class node_extensions,node_hashing,node_json,node_logging,node_consumer toneIndigo
```

## Components

### Input And Data

- [CSV Query](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVQuery.cs): `MathCore/CSV/CSVQuery.cs`
- [CSV Parser](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVParser.cs): `MathCore/CSV/CSVParser.cs`
- [CSV Rows](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/CSVQueryRow.cs): `MathCore/CSV/CSVQueryRow.cs`
- [CSV Values](https://github.com/infarh/mathcore/blob/dev/MathCore/CSV/Value.cs): `MathCore/CSV/Value.cs`
- [Command Processing](https://github.com/infarh/mathcore/tree/dev/MathCore/CommandProcessor): `MathCore/CommandProcessor`
- [Paged Repository](https://github.com/infarh/mathcore/blob/dev/MathCore/Collections/Repository.cs): `MathCore/Collections/Repository.cs`
- [Paged Query Options](https://github.com/infarh/mathcore/blob/dev/MathCore/Queries/QueryOptions.cs): `MathCore/Queries/QueryOptions.cs`
- [Query Results](https://github.com/infarh/mathcore/blob/dev/MathCore/Queries/QueryResult.cs): `MathCore/Queries/QueryResult.cs`

### Math And Numerics

- [Big Integers](https://github.com/infarh/mathcore/blob/dev/MathCore/BigInt.Core.cs): `MathCore/BigInt.Core.cs`
- [Complex Numbers](https://github.com/infarh/mathcore/blob/dev/MathCore/Complex.cs): `MathCore/Complex.cs`
- [Matrices](https://github.com/infarh/mathcore/blob/dev/MathCore/Matrix.cs): `MathCore/Matrix.cs`
- [Vectors](https://github.com/infarh/mathcore/blob/dev/MathCore/Vectors/Vector2D.cs): `MathCore/Vectors/Vector2D.cs`
- [Interpolation](https://github.com/infarh/mathcore/tree/dev/MathCore/Interpolation): `MathCore/Interpolation`
- [Differential Equations](https://github.com/infarh/mathcore/tree/dev/MathCore/DifferentialEquations/Numerical): `MathCore/DifferentialEquations/Numerical`
- [Differentiable Functions](https://github.com/infarh/mathcore/blob/dev/MathCore/Functions/Differentiable/Function.cs): `MathCore/Functions/Differentiable/Function.cs`

### Services And Events

- [Service Manager](https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/ServiceManager.cs): `MathCore/IoC/ServiceManager.cs`
- [Service Registration](https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/ServiceRegistrations/ServiceRegistration.cs): `MathCore/IoC/ServiceRegistrations/ServiceRegistration.cs`
- [Service Mapping](https://github.com/infarh/mathcore/blob/dev/MathCore/IoC/MapServiceRegistration.cs): `MathCore/IoC/MapServiceRegistration.cs`
- [Typed Event Data](https://github.com/infarh/mathcore/blob/dev/MathCore/EventArgs.cs): `MathCore/EventArgs.cs`
- [Event Delegates](https://github.com/infarh/mathcore/blob/dev/MathCore/EventHandler.cs): `MathCore/EventHandler.cs`

### Expression And Query

- [Math Expression Parser](https://github.com/infarh/mathcore/blob/dev/MathCore/MathParser/ExpressionParser.cs): `MathCore/MathParser/ExpressionParser.cs`
- [Expression Tree Nodes](https://github.com/infarh/mathcore/tree/dev/MathCore/MathParser/ExpressionTrees/Nodes): `MathCore/MathParser/ExpressionTrees/Nodes`
- [Expression Visitors](https://github.com/infarh/mathcore/tree/dev/MathCore/Expressions): `MathCore/Expressions`
- [XPath Query Builder](https://github.com/infarh/mathcore/blob/dev/MathCore/Xml/XPath/QueryBuilder1.cs): `MathCore/Xml/XPath/QueryBuilder1.cs`

### General Utilities

- [Extensions And Async](https://github.com/infarh/mathcore/tree/dev/MathCore/Extensions): `MathCore/Extensions`
- [Hash Algorithms](https://github.com/infarh/mathcore/tree/dev/MathCore/Hash): `MathCore/Hash`
- [JSON Support](https://github.com/infarh/mathcore/tree/dev/MathCore/JSON): `MathCore/JSON`
- [Logging](https://github.com/infarh/mathcore/tree/dev/MathCore/Logging): `MathCore/Logging`

### Other components

- **Library Consumer**

## Connections

- Library Consumer → CSV Query: queries CSV
- CSV Query → CSV Parser: parses lines (evidence: `MathCore/CSV/CSVQuery.cs`)
- CSV Query → CSV Rows: yields rows (evidence: `MathCore/CSV/CSVQuery.cs`)
- CSV Rows → CSV Values: wraps values (evidence: `MathCore/CSV/CSVQueryRow.cs`)
- Command Processing → CSV Values: uses conversions (evidence: `MathCore/CommandProcessor/Argument.cs`)
- Command Processing → CSV Values: references values (evidence: `MathCore/MathParser/ExpressionParser.cs`)
- Math Expression Parser → Expression Tree Nodes: builds nodes (evidence: `MathCore/MathParser/ExpressionParser.cs`)
- Math Expression Parser → Differentiable Functions: uses functions (evidence: `MathCore/MathParser/ExpressionParser.cs`)
- XPath Query Builder → Differentiable Functions: uses functions (evidence: `MathCore/Xml/XPath/QueryBuilder1.cs`)
- Service Manager → Service Registration: creates instances (evidence: `MathCore/IoC/ServiceManager.cs`)
- Service Manager → Service Mapping: maps services (evidence: `MathCore/IoC/ServiceManager.cs`)
- Service Registration → Service Manager: resolves dependencies (evidence: `MathCore/IoC/ServiceRegistrations/ServiceRegistration.cs`)
- Event Delegates → Typed Event Data: uses arguments (evidence: `MathCore/EventHandler.cs`)
- Query Results → Paged Query Options: uses options (evidence: `MathCore/Queries/QueryResult.cs`)
