CyberMath 1.0.3

A little library with useful data structures and extension methods. Very useful for students ^-^

Install-Package CyberMath -Version 1.0.3
dotnet add package CyberMath --version 1.0.3
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CyberMath, 1.0.3"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

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)

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)

Release Notes

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

  • .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 History

Version Downloads Last updated
1.0.3 47 2/7/2021
1.0.2 48 1/29/2021
1.0.1 64 1/21/2021