@jungleford/math-folding
v0.1.1
Published
Research for number folding algorithms.
Downloads
20
Maintainers
Readme
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 installUsage
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:
Recursive
An algorithm that is simple to implement.
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, [email protected], [email protected] and [email protected] are recommended.
Inline script is available:
$ npm testor
$ npm run karma