Veggerby.Algorithm 1.0.0

dotnet add package Veggerby.Algorithm --version 1.0.0
                    
NuGet\Install-Package Veggerby.Algorithm -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Veggerby.Algorithm" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Veggerby.Algorithm" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Veggerby.Algorithm" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Veggerby.Algorithm --version 1.0.0
                    
#r "nuget: Veggerby.Algorithm, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Veggerby.Algorithm@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Veggerby.Algorithm&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Veggerby.Algorithm&version=1.0.0
                    
Install as a Cake Tool

Veggerby.Algorithm

Build Status

Contains code for:

  • Linear Algebra
    • Vector calculations
    • Matrix calculations
  • Graph Algorithms
    • Dijkstra shortest path, undirected, weighted graph
    • Bellman-Ford, calculate shortest path in a weighted graph
    • Johnsons's Algorithm for shortest path in a sparse, directed, weighted graph
  • Function/arithmetic evaluation
    • Parsing string function
    • Function evaluation

To come:

  • Eigen vector
  • Matrix determinant calculation
  • Various binary tree algorithms
  • Function integral and derivative

Function Grammar

The following grammar is used for defining functions

    digit       = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;

    letter      = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
                  "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" ;

    sign        = "+" | "-" ;

    operator    = sign | "*" | "/" | "^" ;

    decimal     = ".", {digit} ;

    exponent    = "E", [sign], {digit} ;

    number      = [sign], {digit}, [decimal], [exponent] ;

    identifier  = {letter}, [{ letter | digit | "_" }] ;

    expression  = operand, {operator, operand} | function | factorial ;

    factorial   = operand, "!" ;

    function    = identifier, "(", operand, [{ ",", operand }], ")" ;

    operand     = number | identifier | expression | "(", operand, ")" | sign, operand ;

    equation    = expression, "=", expression ;

Function Complexity

Constant and NamedConstant will add 1 Variable and Fraction will add 2 Addition and Multiplication will add 1, i.e. x+y will yield Complexity(x) + Complexity(y) + 1 Subtraction and Negative will add 2, i.e. x-y will yield Complexity(x) + Complexity(y) + 2 Division and Power will add 3, i.e. x/y will yield Complexity(x) + Complexity(y) + 3 Sine, Cosine, Logarithm and Exponential functions will add 2, i.e. f(x), Complexity(x) + 2 LogarithmBase, Tangent and Root will add 3 Factorial, Maximum and Minimum will add 4 Function will add 2 FunctionReference will add 2 and sum of parameter, i.e. f(x, y) = Complexity(x) + Complexity(y) + 2

Ordering

Constant 1 Fraction 2 Named Constant 3 Unspecified Constant 4 Variable 5 Negative 6 Addition 7 Subtraction 8 Multiplication 9 Division 10 Power 11 Function 12 FunctionReference 13 Factorial 14 Exponential 15 Logarithm 16 Sine 17 Cosine 18 Tangent 19 Root 20 LogarithmBase 21 Minimum 22 Maximum 23

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Veggerby.Algorithm:

Package Downloads
Veggerby.Boards

Core engine for Veggerby.Boards: immutable board game modeling, artifact states, phases, rules and deterministic game state transitions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 192 10/25/2024