0.1.1 • Published 4 years ago
@jungleford/math-folding v0.1.1
math-folding: 对折序列问题(Number Folding Problem)
Research for number folding algorithms.
The detailed analysis is here. (Chinese edition only)
Related Projects
- math-folding-react: Web UI to represent the algorithm by using React JS and Material UI.
- math-folding-wechat: A mobile UI working on WeiXin mini program (微信小程序).
- simple-utils: A set of simple utilities for internal usage.
Install
$ npm install
Usage
For ES6,
import {Constants, FOF, SOF} from '@jungleford/math-folding';
For ES5,
var Constants = require('@jungleford/math-folding').Constants;
var FOF = require('@jungleford/math-folding').FOF;
var SOF = require('@jungleford/math-folding').SOF;
API
First Ording Folding (FOF)
Second Ording Folding (SOF)
Algorithms
Currently I only resolved First-Order Folding (FOF) and Second-Order Folding (SOF).
So far, this bundle includes two algorithms:
1) Recursive
An algorithm that is simple to implement.
1) Formula
A non-recursive algorithm, which needs somewhat a complicate way to understand, especially for SOF.
Testing
You need a mocha or karma command line utility, for this package, mocha@5.2.0, mocha-webpack@2.0.0-beta.0 and karma@3.1.4 are recommended.
Inline script is available:
$ npm test
or
$ npm run karma