UNPKG

mathball

Version:

A JavaScript library for Competitive Programming

91 lines (85 loc) 2.04 kB
'use strict'; /* Numbers' Problem */ var Complex = require('./complex'), check = require('./check'), find = require('./find'), range = require('./range'); /* Helper Functions */ var perf = require('./performance'), pipe = require('./pipe'); /* Core Tools */ var abs = require('./absolute'), add = require('./add'), avg = require('./average'), nCr = require('./binomial-coeff'), /*===== */ toDegrees = require('./degree'), //combine these two toRadians = require('./radian'), //modules into one, namely 'convert' /* convert = require('./convert'), */ /*===== */ count = require('./count'), div = require('./divide'), gcd = require('./gcd'), lcm = require('./lcm'), length = require('./length'), max = require('./max'), median = require('./median'), min = require('./min'), inverse = require('./inverse'), mul = require('./multiply'), permute = require('./permute'), phi = require('./totient'), popcount = require('./popcount'), pow = require('./pow'), sort = require('./sort'), sub = require('./subtract'), sum = require('./sum'); /* Data Structures */ var matrixChain = require('./matrixChain'), // module implementation under matrixExpo = require('./matrixExponentiation'), // one data type, 'Matrix' /*=====*/ Graph = require('./graph'), PriorityQueue = require('./priority-queue'), Stack = require('./stack'); /* M - Mathball Object */ module.exports = { find: find, permute: permute, gcd: gcd, add: add, sub: sub, mul: mul, div: div, abs: abs, lcm: lcm, length: length, /* ===== */ /* Replace these two with 'Matrix' */ matrixChain: matrixChain.matrixChain, matrixExpo: matrixExpo.matrixExpo, /* ===== */ max: max, median: median, min: min, nCr: nCr, perf: perf, pipe: pipe, popcount: popcount, pow: pow, phi: phi, sort: sort, sum: sum, avg: avg, inverse: inverse, count: count, PriorityQueue: PriorityQueue, Stack: Stack, Graph: Graph, range: range, Complex: Complex, check: check };