0.1.1 • Published 4 years ago

@jungleford/math-folding v0.1.1

Weekly downloads
-
License
(MIT)
Repository
github
Last release
4 years ago

math-folding: 对折序列问题(Number Folding Problem) npm (scoped)

Research for number folding algorithms.

The detailed analysis is here. (Chinese edition only)

Related Projects

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