Skip to content

[FEATURE REQUEST] Update to Maths package and Mew DS package #6192

Open
@21kondav

Description

@21kondav

Additions To Math Package and New Data Structure Package

Math Package Structure.

Additions to the the math package and origination changes:

mathematics (over view)

  • discrete math (combinatorics graph algorithms, tiling, logic, etc)
  • linearalgebra (Gaussian Elimination, Determinants, inverses, etc)
  • calculus (newtons method, numerical differential equations taylor series)
  • geometry (ray tracing, convex hull)

New Math Implementations I can add now
gaussianElimination: Given a set of linear equations, find a non zero solution.

abstractSyntaxTree(): Given a well formed algebraic expression, reduce it to a minimal number of terms

numericalDeriv(): Find the discrete nth derivative of
of a function with an order of accuracy o

Some other note worthy algorithms belonging to other categories:

Graphs: BellmanFord - finds shortest path with negative weights, UnionFind - connect two points and check if they are connected to the same chain
Trees: Balance a binary tree

data structure package:

While java does offer numerous data structures and I am aware this is an algorithms based repo, a fundamental part of algorithms is properly constructing (for example Java’s design of Stack is flawed) and using data structures correctly. Also many important algorithms come out of data structures . I am proposing a correctly written and well documented package containing the data structures necessary to any of the algorithms already present.

In each Data structure should include algorithms which prevalent or common to the data structure itself. For example, while the java LinkedList is effective at what it does, it implements multiple interfaces which can muddy the educational values. Some data structures don’t exist in standard java like a basic binary tree.

  • contains

Issue details

Algorithms:
gaussianElimination(String[])
algebraSimplify(String)
numericalDeriv(Unary)
bellmanFord()
balanceTree()

Data Structure class Example:

//documentation with URL to wiki
BinaryTree //clear description of purpose and use case
//description of any inner classes
Node right //description of properties
Node left

  • add //clear description of use and O time
  • remove
  • insert
  • balance
  • rotate
  • contains

Notice that despite being a data structure, all of these methods are very important and sometimes
unintuitive algorithms.
Possible Package:
datastructures

  • linear
    LinkedList
    Stack
    Queue
    Bag
  • trees
    RedBlack
    BinaryTree
    NArryTree
  • graphs
    HashGraph (using hashmap)
    AdjancencyGraph (using adjacency matrix)
    ReferenceGraph (Using node references)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions