https://github.com/jirikostiha/smath

Alternative math library based on .Net 7 generic math.

https://github.com/jirikostiha/smath

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords

alternative combinatorics csharp dotnet generic-math geometry math vectors

Keywords from Contributors

interactive projection genomics observability autograding hacking shellcodes fairness archival network-simulation
Last synced: 5 months ago · JSON representation

Repository

Alternative math library based on .Net 7 generic math.

Basic Info
  • Host: GitHub
  • Owner: jirikostiha
  • License: mit
  • Language: C#
  • Default Branch: main
  • Homepage:
  • Size: 312 KB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 9
Topics
alternative combinatorics csharp dotnet generic-math geometry math vectors
Created about 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Funding License

readme.md

SMath

SMath

GitHub repo size GitHub code size Nuget
Build Code Analysis Code Lint

Overview

SMath is a math library built on .NET 7 generic math, offering a comprehensive set of static types for working with 2D geometry and statistics.

Features

Generic Math Capabilities

Leverages .NET 7s new generic math features, allowing type-safe mathematical operations on various numeric types.

Geometry (2D)

Handle 2D geometric computations with ease. Available types and operations include:

  • Point
    • Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance
  • Line
    • Ray, Line Segment
    • Operations: Projection, Intersection, Inclusion
  • Circle
    • Arc, Chord, Sector, Segment
    • Operations: Perimeter, Region, Tangent Points, Inclusion
  • Rectangles
    • Vertices
    • Operations: Perimeter

Statistical Analysis

Perform basic statistical calculations:

  • Correlation
  • Variance
  • Covariance
  • Standard Deviation
  • Histograms

Setup

Add nuget package to project.

xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="SMath" Version="X.X.X" /> </ItemGroup> </Project> Replace 'X.X.X' with the appropriate version from NuGet.

Usage

Here are some basic usage examples to get started with SMath:

Geometry: Working with Circles and Lines

```cs // Using double precision var line1 = Circle.TangentLine.FromAngle(radius: 5d, angle: Math.PI / 4d);

// Using float precision var line2 = Circle.TangentLine.FromAngle(radius: 5f, angle: MathF.PI / 4f);

// Find tangent points from a circle var tangentPoints = Circle.TangentPoint.FromPoint(radius: 2d, (4, 4)); var secantLine = Line.FromTwoPoints(tangentPoints.Value.Point1, tangentPoints.Value.Point2); ```

Statistical Calculations

cs // Example of calculating variance var values = new double[] { 1, 2, 3, 4, 5 }; double variance = Statistics.Variance(values); Console.WriteLine($"Variance: {variance}");

Contributing

Any ideas, contributions and bug reports are welcome!

For new idea create an issue.
For bug report create an issue.
For contribution create a pull request.

License

Project is under MIT license.

Owner

  • Login: jirikostiha
  • Kind: user
  • Location: Prague, Czech Republic

GitHub Events

Total
  • Release event: 4
  • Watch event: 1
  • Delete event: 7
  • Push event: 26
  • Pull request review event: 4
  • Pull request event: 4
  • Create event: 12
Last Year
  • Release event: 4
  • Watch event: 1
  • Delete event: 7
  • Push event: 26
  • Pull request review event: 4
  • Pull request event: 4
  • Create event: 12

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 240
  • Total Committers: 4
  • Avg Commits per committer: 60.0
  • Development Distribution Score (DDS): 0.183
Past Year
  • Commits: 29
  • Committers: 3
  • Avg Commits per committer: 9.667
  • Development Distribution Score (DDS): 0.241
Top Committers
Name Email Commits
Jiri Kostiha i****a@g****m 196
C# linter l****n@s****m 31
dependabot[bot] 4****] 12
Jasper1467 3****7 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 20
  • Average time to close issues: N/A
  • Average time to close pull requests: 16 days
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 20
Past Year
  • Issues: 0
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 17 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (20)
Top Labels
Issue Labels
Pull Request Labels
dependencies (20) github_actions (4)

Packages

  • Total packages: 1
  • Total downloads:
    • nuget 2,379 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
  • Total maintainers: 1
nuget.org: smath

Alternative math library based on .Net 7 generic math.

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,379 Total
Rankings
Dependent repos count: 13.8%
Dependent packages count: 18.8%
Average: 24.9%
Downloads: 41.9%
Maintainers (1)
Last synced: 6 months ago