robust-compress
Compress a robust sequence
Last updated 11 years ago by mikolalysenko .
MIT · Repository · Bugs · Original npm
$ cnpm install robust-compress 
SYNC missed versions from official npm registry.

robust-compress

Quickly compress a non-overlapping increasing sequence. This does not normalize the sequence, but can be useful in some situations. Based on the algorithm in:

Jonathan Shewchuk, "Adaptive precision floating-point arithmetic and fast robust predicates for computational geometry"

Example

var compress = require("robust-compress")

var seq = [1, 2]

compress(seq)

console.log(seq)

Output:

[ 3 ]

Install

npm install robust-compress

API

require("robust-compress")(seq)

Approximately compress a non-overlapping increasing floating point expansion in place.

  • seq is a robust sequence

Returns seq

Note This method updates seq in place

Credits

(c) 2014 Mikola Lysenko. MIT License

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

1 Versions

  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org