asc-community / asc-community/AngouriMath

Generic math structure

Open
#510 0 comments 0 reactions 0 assignees View on GitHub
Design document Not now
Dominant language
C#
Stars
831
Forks
79
Avg merge
3h 23m
Merged PRs (30d)
309

Description

# Core interfaces

- [x] Approved
- [x] [Implemented](https://github.com/asc-community/AngouriMath/pull/509)

## IClosedArithmetics

```cs
public interface IClosedArithmetics
```

It will inherit `+`, `-`, `*`, also unary `+` and `-`.

## IHasNeutralValues

```cs
public interface IHasNeutralValues
: IAdditiveIdentity,
IMultiplicativeIdentity
```

## IScalarClosedArithmetics

```cs
public interface IScalarClosedArithmetics
: IClosedArithmetics,
IComparisonOperators
```

## IHasAbsoluteValue

```cs
public interface IHasAbsoluteValue
{
abstract static TOut Abs(TSelf self);
}
```

# Implementation relations

## Entity

It will implement `IClosedArithmetics`, `IDivisionOperators`, `IParseable`, `IHasAbsoluteValue`, and `IHasNeutralValues`.

## Complex

It will implement `IClosedArithmetics`, `IDivisionOperators`, `IHasAbsoluteValue`, `IHasNeutralValues`.

## Real

It will implement `IScalarClosedArithmetics`, `IDivisionOperators`, `IHasAbsoluteValue`, `IHasNeutralValues`.

## Rational

It will implement `IScalarClosedArithmetics`, `IDivisionOperators`, `IHasAbsoluteValue`, `IHasNeutralValues`.

## Integer

It will implement `IScalarClosedArithmetics`, `IDivisionOperators`, `IHasAbsoluteValue`, `IHasNeutralValues`.

## Matrix

It will implement `IClosedArithmetics`.

# Applied to

.NET 6+ thanks to the `NET6_0` variable.

Contributor guide

Open the contributing guide

Research direction

Review pull request 509 and the existing Entity, Complex, Real, Rational, Integer, and Matrix types. Check the NET6_0-gated generic-math interfaces and implementation relations listed here; the work is done when those declarations and relations match the approved specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.