Skip to content

Commit d8b2126

Browse files
author
Aurélien Ooms
authored
Merge branch 'master' into greenkeeper/update-all
2 parents 150e600 + 403371b commit d8b2126

39 files changed

+1325
-1274
lines changed

.codeclimate.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
languages:
22
JavaScript: true
33
exclude_paths:
4-
- "js/dist/*.js"
5-
- "js/dist/**/*.js"
6-
- "test/*.js"
7-
- "test/**/*.js"
4+
- "doc/**"
5+
- "lib/**"
6+
- "test/**"

.gitignore

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
1-
# Logs
2-
logs
3-
*.log
4-
5-
# Runtime data
6-
pids
7-
*.pid
8-
*.seed
9-
10-
# Directory for instrumented libs generated by jscoverage/JSCover
11-
lib-cov
12-
13-
# Coverage directory used by tools like istanbul
14-
coverage
15-
16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17-
.grunt
18-
19-
# Compiled binary addons (http://nodejs.org/api/addons.html)
20-
build/Release
21-
221
# Dependency directory
23-
# Deployed apps should consider commenting this line out:
24-
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
252
node_modules
3+
jspm_packages
4+
5+
# Coverage directory used by nyc
6+
coverage
7+
.nyc_output
268

27-
# groc
28-
doc
9+
# Documentation
10+
gh-pages

.groc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
language: node_js
2+
23
node_js:
3-
- "iojs"
4-
- "0.12"
5-
- "0.11"
6-
- "0.10"
4+
- node
5+
76
install:
8-
- npm -d install
7+
- npm install
8+
99
script:
10-
- npm test
10+
- npm run cover
11+
1112
after_success:
12-
- ./node_modules/.bin/coveralls < coverage/lcov.info || true
13-
- ./node_modules/.bin/codeclimate < coverage/lcov.info || true
13+
- bash <(curl -s https://codecov.io/bash) || true
14+
- coveralls < coverage/lcov.info || true
15+
- codeclimate-test-reporter < coverage/lcov.info || true

README.md

Lines changed: 3 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[js-binomial-heap](http://aureooms.github.io/js-binomial-heap)
22
==
33

4-
Binomial heap code bricks in JavaScript. Parent is
5-
[aureooms/js-heap](https://github.com/aureooms/js-heap).
4+
Binomial heap data structures for JavaScript.
5+
Parent is [aureooms/js-heap](https://github.com/aureooms/js-heap).
66

77
```js
88
//
@@ -18,160 +18,15 @@ Binomial heap code bricks in JavaScript. Parent is
1818

1919
[![NPM license](http://img.shields.io/npm/l/aureooms-js-binomial-heap.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-binomial-heap/master/LICENSE)
2020
[![NPM version](http://img.shields.io/npm/v/aureooms-js-binomial-heap.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-binomial-heap)
21-
[![Bower version](http://img.shields.io/bower/v/aureooms-js-binomial-heap.svg?style=flat)](http://bower.io/search/?q=aureooms-js-binomial-heap)
2221
[![Build Status](http://img.shields.io/travis/aureooms/js-binomial-heap.svg?style=flat)](https://travis-ci.org/aureooms/js-binomial-heap)
2322
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-binomial-heap.svg?style=flat)](https://coveralls.io/r/aureooms/js-binomial-heap)
2423
[![Dependencies Status](http://img.shields.io/david/aureooms/js-binomial-heap.svg?style=flat)](https://david-dm.org/aureooms/js-binomial-heap#info=dependencies)
2524
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-binomial-heap.svg?style=flat)](https://david-dm.org/aureooms/js-binomial-heap#info=devDependencies)
2625
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-binomial-heap.svg?style=flat)](https://codeclimate.com/github/aureooms/js-binomial-heap)
2726
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-binomial-heap.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-binomial-heap)
2827
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-binomial-heap.svg?style=flat)](https://github.com/aureooms/js-binomial-heap/issues)
29-
[![Inline docs](http://inch-ci.org/github/aureooms/js-binomial-heap.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-binomial-heap)
30-
31-
Can be managed through [jspm](https://github.com/jspm/jspm-cli),
32-
[duo](https://github.com/duojs/duo),
33-
[component](https://github.com/componentjs/component),
34-
[bower](https://github.com/bower/bower),
35-
[ender](https://github.com/ender-js/Ender),
36-
[jam](https://github.com/caolan/jam),
37-
[spm](https://github.com/spmjs/spm),
38-
and [npm](https://github.com/npm/npm).
39-
40-
## Description
41-
42-
This package contains binomial heap implementations.
43-
44-
45-
## Install
46-
47-
### jspm
48-
```terminal
49-
jspm install github:aureooms/js-binomial-heap
50-
# or
51-
jspm install npm:aureooms-js-binomial-heap
52-
```
53-
### duo
54-
No install step needed for duo!
55-
56-
### component
57-
```terminal
58-
component install aureooms/js-binomial-heap
59-
```
60-
61-
### bower
62-
```terminal
63-
bower install aureooms-js-binomial-heap
64-
```
65-
66-
### ender
67-
```terminal
68-
ender add aureooms-js-binomial-heap
69-
```
70-
71-
### jam
72-
```terminal
73-
jam install aureooms-js-binomial-heap
74-
```
75-
76-
### spm
77-
```terminal
78-
spm install aureooms-js-binomial-heap --save
79-
```
80-
81-
### npm
82-
```terminal
83-
npm install aureooms-js-binomial-heap --save
84-
```
85-
86-
## Require
87-
### jspm
88-
```js
89-
let binomialheap = require( "github:aureooms/js-binomial-heap" ) ;
90-
// or
91-
import binomialheap from 'aureooms-js-binomial-heap' ;
92-
```
93-
### duo
94-
```js
95-
let binomialheap = require( "aureooms/js-binomial-heap" ) ;
96-
```
97-
98-
### component, ender, spm, npm
99-
```js
100-
let binomialheap = require( "aureooms-js-binomial-heap" ) ;
101-
```
102-
103-
### bower
104-
The script tag exposes the global variable `binomialheap`.
105-
```html
106-
<script src="bower_components/aureooms-js-binomial-heap/js/dist/binomial-heap.min.js"></script>
107-
```
108-
Alternatively, you can use any tool mentioned [here](http://bower.io/docs/tools/).
109-
110-
### jam
111-
```js
112-
require( [ "aureooms-js-binomial-heap" ] , function ( binomialheap ) { ... } ) ;
113-
```
114-
115-
## Use
116-
117-
```js
118-
// can choose between 3 different implementations
119-
//
120-
// - BinomialHeap( BinomialTreeWithParent )
121-
// # head -> value
122-
// # headreference -> reference
123-
// # pop -> value
124-
// # popreference -> reference
125-
// # push( value ) -> reference
126-
// # pushreference( reference )
127-
// # merge( other )
128-
// # update( reference , value )
129-
// # decreasekey( reference , value )
130-
// # increasekey( reference , value )
131-
// # delete( reference )
132-
//
133-
// - BinomialHeap( BinomialTree )
134-
// # head -> value
135-
// # pop -> value
136-
// # push( value )
137-
// # merge( other )
138-
//
139-
// - LazyBinomialHeap( BinomialTree )
140-
// # pop -> value
141-
// # push( value )
142-
// # merge( other )
143-
144-
let compare = require( "aureooms-js-compare" ) ;
145-
146-
let Heap = binomialheap. ... ( binomialheap. ... ) ;
147-
148-
let a = new Heap( compare.increasing ) ;
149-
let b = new Heap( compare.increasing ) ;
150-
151-
a.push( 5 ) ;
152-
a.push( 1 ) ;
153-
a.push( 4 ) ;
154-
b.push( 3 ) ;
155-
b.push( 2 ) ;
156-
157-
a.length ; // 3
158-
b.length ; // 2
159-
160-
a.merge( b ) ;
161-
delete b ;
162-
163-
a.length ; // 5
164-
165-
a.pop( ) ; // 1
166-
a.pop( ) ; // 2
167-
a.pop( ) ; // 3
168-
a.pop( ) ; // 4
169-
a.pop( ) ; // 5
170-
171-
a.length ; // 0
172-
```
28+
[![Documentation](https://aureooms.github.io/js-binomial-heap/badge.svg)](https://aureooms.github.io/js-binomial-heap/source.html)
17329

17430
## Reference
17531

17632
- http://www.cs.princeton.edu/~wayne/cs423/lectures/heaps-4up.pdf
177-

bower.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

component.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/css/style.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
h1,
2+
h2,
3+
.navigation,
4+
.layout-container > header,
5+
footer
6+
{
7+
border: none;
8+
}
9+
10+
.project-name {
11+
color: #FC913A;
12+
font-weight: bold;
13+
}
14+
15+
.layout-container > header > a.repo-url-github {
16+
font-size: inherit;
17+
display: inline;
18+
background: none;
19+
vertical-align: inherit;
20+
}
21+
22+
.search-box img {
23+
display: none;
24+
}
25+
26+
.search-box::before{
27+
content: "search";
28+
}
29+
30+
.search-input-edge {
31+
height: 0px;
32+
}
33+
34+
.search-result {
35+
width: 300px;
36+
margin-left: 42px;
37+
box-shadow: 1px 1px 13px rgba(0,0,0,0.2);
38+
}
39+
40+
.search-input {
41+
visibility: visible;
42+
}
43+
44+
.search-result li.search-separator {
45+
text-transform: capitalize;
46+
background-color: #ccc;
47+
}
48+
49+
span[data-ice="signature"] > span {
50+
/*font-weight: bold;*/
51+
font-style: italic;
52+
}

doc/manual/example.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
```js
3+
// can choose between 3 different implementations
4+
//
5+
// - BinomialHeap( BinomialTreeWithParent )
6+
// # head -> value
7+
// # headreference -> reference
8+
// # pop -> value
9+
// # popreference -> reference
10+
// # push( value ) -> reference
11+
// # pushreference( reference )
12+
// # merge( other )
13+
// # update( reference , value )
14+
// # decreasekey( reference , value )
15+
// # increasekey( reference , value )
16+
// # delete( reference )
17+
//
18+
// - BinomialHeap( BinomialTree )
19+
// # head -> value
20+
// # pop -> value
21+
// # push( value )
22+
// # merge( other )
23+
//
24+
// - LazyBinomialHeap( BinomialTree )
25+
// # pop -> value
26+
// # push( value )
27+
// # merge( other )
28+
29+
let compare = require( "aureooms-js-compare" ) ;
30+
31+
let Heap = binomialheap. ... ( binomialheap. ... ) ;
32+
33+
let a = new Heap( compare.increasing ) ;
34+
let b = new Heap( compare.increasing ) ;
35+
36+
a.push( 5 ) ;
37+
a.push( 1 ) ;
38+
a.push( 4 ) ;
39+
b.push( 3 ) ;
40+
b.push( 2 ) ;
41+
42+
a.length ; // 3
43+
b.length ; // 2
44+
45+
a.merge( b ) ;
46+
delete b ;
47+
48+
a.length ; // 5
49+
50+
a.pop( ) ; // 1
51+
a.pop( ) ; // 2
52+
a.pop( ) ; // 3
53+
a.pop( ) ; // 4
54+
a.pop( ) ; // 5
55+
56+
a.length ; // 0
57+
```

0 commit comments

Comments
 (0)