CyberMath 1.0.3

dotnet add package CyberMath --version 1.0.3                
NuGet\Install-Package CyberMath -Version 1.0.3                
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="CyberMath" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CyberMath --version 1.0.3                
#r "nuget: CyberMath, 1.0.3"                
#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.
// Install CyberMath as a Cake Addin
#addin nuget:?package=CyberMath&version=1.0.3

// Install CyberMath as a Cake Tool
#tool nuget:?package=CyberMath&version=1.0.3                

A little library with useful data structures and extension methods.

Nuget Package

PM> Install-Package CyberMath -Version 1.0.3

  • Two-dimensional arrays

    • Matrix
    • Jugged Matrix
    • Dynamic Matrix
    • Dynamic Jugged Matrix
  • Binary Trees

    • Vanilla Tree

    • AVL Tree

    • Red Black Tree

    • Common interface: IBinaryTree : ICollection, IDisposable where T : IComparable<T>, IComparable

  • Helpers

    • FixExpressionConverter (Class for converting xFix expression into yFix)
      • Infix → Postfix ⇒ A+B*C/(E-F) → ABC*EF-/+<br/>
      • Infix → Prefix ⇒ A+B*C/(E-F) → +A*B/C-EF<br/>
      • Postfix → Infix ⇒ ABC*EF-/+ → (A+((B*C)/(E-F)))<br/>
      • Postfix → Prefix ⇒ ABC/-AK/L-* → *-A/BC-/AKL<br/>
      • Prefix → Infix ⇒ +A*B/C-EF → (A+(B*(C/(E-F))))<br/>
      • Prefix → Postfix ⇒ *-A/BC-/AKL → ABC/-AK/L-*
    • GenericTypesExtensions (Just a class to make out life and programming faster and more productive)
      • SerializableDeepCopy → T (Makes a deep copy of item. Type of item should be marked as [Serializable]; otherwise → EXCEPTION)
  • Extension methods

    • Extension methods for collections

      • Swap → void (Swaps items in indexed collections)
      • Shuffle → void (Shuffles the items in an indexed collection)
      • RandomItem → T (Gets a random item from collection)
      • Permutations → IEnumerable<IEnumerable<T>> (Returns a new collections with all permutations of elements with repeating elements)
      • PermutationsWithRepeat → IEnumerable<IEnumerable<T>&gt (Returns a new collections with all permutations of elements with repeating elements)
    • Extension methods for strings

      • Concat → string
      • IsPalindrome → bool (Checks string for palindromicity)
      • IsAnagramOf → bool (Checks two string for anagramism)
      • WordsFrequency → Dictionary<char,int> (Creates a Dictionary<TKey,TValue> where TKey is char and TValue is int (count of TKey in input string))
      • ToInt32 → int (Returns string parsed to Int32)
      • ToInt64 → long (Returns string parsed to Int64)
      • ToAlternatingCase → (Converts input string to alternating case)
    • Extension methods for Random

      • NextDouble → double (Generates a double number between min and max)
      • NextLong → long (Generates a long number between min and max)
    • Extension methods for Int32 and Int64

      • IsPalindrome → bool (Checks number for palindromicity)

      • IsOdd → bool (Checks is number odd)

      • IsEven → bool (Checks is number even)

      • GCD (greatest common divisor) → int/long (Calculates greatest common divisor between two numbers)

      • LCM (lowest common multiple) → int/long (Calculates lowest common multiple between two numbers)

      • Swap → void (Swaps two integers in memory (by ref))

      • GetLength → int (Calculates the length of number)

      • ToBinary → string (Converts number to binary(2) format)

      • ToHex → string (Converts number to HEX(16) format)

      • GetDigits → IEnumerable<byte> Gets all digits of number as a collection

      • Extension methods for Prime Numbers

        • IsPrime → bool (Checks number for primality)
        • GenerateRandomPrimeNumber → Int32/Int64 (Generating one random prime number)
        • GeneratePrimeNumbers → IEnumerable<Int32/Int64> (Generates IEnumerable collection of prime numbers which are less than max)
    • Extension methods for all matrices

      • IsMaxInColumn → bool (Returns bool value if element at [i, j] is max in IMatrixBase<IComparable> matrix column at index j)

      • IsMinInRow → bool (Returns bool value if element at [i, j] is min in IMatrixBase<IComparable> matrix row at index i)

      • DiagonalSum → int/long/souble/decimal/short and Nullable (ONLY FOR SQUARE Calculates sum of all items on main diagonal)

      • SideDiagonalSum → int/long/souble/decimal/short and Nullable (ONLY FOR SQUARE Calculates sum of all items on side diagonal)

      • SumSaddlePoints → int/long/souble/decimal/short and Nullable (Calculates sum of all saddle points in matrix)

      • CreateMatrixWithoutRow → IJuggedMatrix/IMatrix (Creates a new matrix without row at rowIndex)

      • CreateMatrixWithoutColumn → IJuggedMatrix/IMatrix (Creates a new matrix without column at columnIndex)

      • For primitives

        • Add → IMatrixBase<T> (Returns the add IMatrixBase first and IMatrixBase second)
        • Sub → IMatrixBase<T> (Returns the sub IMatrixBase first and IMatrixBase second)
        • MulOnNumber → IMatrixBase<T> (Returns the multiplication IMatrixBase matrix on number)
        • FillRandomly → void (Fills matrix with randomly generated items)
    • Extension methods for JuggedMatrix<T>

      • CountOnEachRow → IEnumerable<int> ()
      • ToMatrix → IMatrix<T> (Creates a new instance of IMatrix from IJuggedMatrix)
      • CreateVanilla → T[][] (Creates a vanilla array of arrays on base of JuggedMatrix)
    • Extension methods for IMatrix<T>

      • ToJuggedMatrix → IJuggedMatrix<T> (Creates a new instance of IJuggedMatrix from IMatrix)

      • CreateVanilla → T[,] (Creates a vanilla matrix on base of Matrix)

      • For primitives

        • Multiplication → IMatrix<T> (Returns the mul IMatrix first and IMatrix second)
        • CalculateDeterminant → int/long/double/decimal and Nullable (Calculates determinant for IMatrix)
        • CreateInvertibleMatrix → IMatrix<double> (Creates inverted matrix from IMatrix)
        • CalculateMinor → int/long/souble/decimal and Nullable (Calculates minor for IMatrix)
  • Equations

    • Quadratic (Represents a class for building quadratic equation)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 395 2/7/2021
1.0.2 304 1/29/2021
1.0.1 377 1/21/2021

1.0.3:
- New extension methods
- New structures - Dynamic matrices
- Migration to .NET Standard 2.0 - 2.1