This project aims to provide some much needed Higher Math Functionality implemented in Native Motoko to help builders build.
It contains (but is not limited to) the following:
- Complex Numbers
- Clustering (KNN, Linear Regression)
- Hyperbolic Functions
- Mean, Median, Mode, Wmean, etc
- Pseudorandom function with 2 degrees of randomness
- Covariance (NEW)
- Data Normalization (NEW)
- Progressions (NEW)
- Data Prediction (NEW)
- Naive Bayesian Classifier (NEW)
This is an open-source repository and we always encourage anyone who wants to contribute to freely do so.
This is our implementation of Buffer from the Motoko base library, but with many added functions. A brief overview of the added functions is given below (and marked with //NEW in the code):
- split_permanent: the split will affect parent buffer permanently
- range: provides the max - min for a buffer where possible
- intersection: gives the intersection of the two input buffers
- rotate_left: rotates the elements of the buffer to the left around the specified axis
- rotate_right: rotates the elements of the buffer to the right around the specified axis
- swap: exchanges elements at given two positions of the buffer
- truncate: truncates the buffer beyond given length
- fill: creates a buffer with each element set to the same value as specified
- hashmapToBuffer: converts a hashmap to a tuple buffer
- split_first: outputs a tuple of the first element of the buffer, and a buffer composed of all other elements of it