<commit_before>[js-disjoint-set](http://aureooms.github.io/js-disjoint-set)
==

disjoint-set data structure code bricks for JavaScript

[![NPM license](http://img.shields.io/npm/l/aureooms-js-disjoint-set.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-disjoint-set/master/LICENSE)
[![NPM version](http://img.shields.io/npm/v/aureooms-js-disjoint-set.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-disjoint-set)
[![Bower version](http://img.shields.io/bower/v/aureooms-js-disjoint-set.svg?style=flat)](http://bower.io/search/?q=aureooms-js-disjoint-set)
[![Build Status](http://img.shields.io/travis/aureooms/js-disjoint-set.svg?style=flat)](https://travis-ci.org/aureooms/js-disjoint-set)
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-disjoint-set.svg?style=flat)](https://coveralls.io/r/aureooms/js-disjoint-set)
[![Dependencies Status](http://img.shields.io/david/aureooms/js-disjoint-set.svg?style=flat)](https://david-dm.org/aureooms/js-disjoint-set#info=dependencies)
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-disjoint-set.svg?style=flat)](https://david-dm.org/aureooms/js-disjoint-set#info=devDependencies)
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-disjoint-set.svg?style=flat)](https://codeclimate.com/github/aureooms/js-disjoint-set)
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-disjoint-set.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-disjoint-set)
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-disjoint-set.svg?style=flat)](https://github.com/aureooms/js-disjoint-set/issues)


Example usage:


	var disjointset = require( "aureooms-js-disjoint-set" ) ;

	// can choose between 8 different implementations
	//   - ForestAmortizedHalving
	//   - ForestAmortizedRecursive
	//   - ForestAmortizedSplitting
	//   - ForestAmortizedTwoPasses
	//   - Forest
	//   - LinkedList
	//   - LinkedListWithHeadAndLength
	//   - LinkedListWithHead

	var makeset = disjointset.ForestAmortizedHalving.makeset ;
	var union = disjointset.ForestAmortizedHalving.union ;
	var find = disjointset.ForestAmortizedHalving.find ;

	var a , b , c , A , B , C ;

	A = a = makeset( ) ;
	B = b = makeset( ) ;
	C = c = makeset( ) ;

	find( a ) === find( a ) ; // true
	find( a ) === find( b ) ; // false
	find( a ) === find( c ) ; // false

	find( b ) === find( a ) ; // false
	find( b ) === find( b ) ; // true
	find( b ) === find( c ) ; // false

	find( c ) === find( a ) ; // false
	find( c ) === find( b ) ; // false
	find( c ) === find( c ) ; // true

	A = union( A , B ) ; // union( B , A ) would work too
	delete B ;

	find( a ) === find( a ) ; // true
	find( a ) === find( b ) ; // true
	find( a ) === find( c ) ; // false

	find( b ) === find( a ) ; // true
	find( b ) === find( b ) ; // true
	find( b ) === find( c ) ; // false

	find( c ) === find( a ) ; // false
	find( c ) === find( b ) ; // false
	find( c ) === find( c ) ; // true
<commit_msg>javascript syntach hl on github<commit_after>[js-disjoint-set](http://aureooms.github.io/js-disjoint-set)
==

disjoint-set data structure code bricks for JavaScript

[![NPM license](http://img.shields.io/npm/l/aureooms-js-disjoint-set.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-disjoint-set/master/LICENSE)
[![NPM version](http://img.shields.io/npm/v/aureooms-js-disjoint-set.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-disjoint-set)
[![Bower version](http://img.shields.io/bower/v/aureooms-js-disjoint-set.svg?style=flat)](http://bower.io/search/?q=aureooms-js-disjoint-set)
[![Build Status](http://img.shields.io/travis/aureooms/js-disjoint-set.svg?style=flat)](https://travis-ci.org/aureooms/js-disjoint-set)
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-disjoint-set.svg?style=flat)](https://coveralls.io/r/aureooms/js-disjoint-set)
[![Dependencies Status](http://img.shields.io/david/aureooms/js-disjoint-set.svg?style=flat)](https://david-dm.org/aureooms/js-disjoint-set#info=dependencies)
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-disjoint-set.svg?style=flat)](https://david-dm.org/aureooms/js-disjoint-set#info=devDependencies)
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-disjoint-set.svg?style=flat)](https://codeclimate.com/github/aureooms/js-disjoint-set)
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-disjoint-set.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-disjoint-set)
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-disjoint-set.svg?style=flat)](https://github.com/aureooms/js-disjoint-set/issues)


Example usage:


```javascript
var disjointset = require( "aureooms-js-disjoint-set" ) ;

// can choose between 8 different implementations
//   - ForestAmortizedHalving
//   - ForestAmortizedRecursive
//   - ForestAmortizedSplitting
//   - ForestAmortizedTwoPasses
//   - Forest
//   - LinkedList
//   - LinkedListWithHeadAndLength
//   - LinkedListWithHead

var makeset = disjointset.ForestAmortizedHalving.makeset ;
var union = disjointset.ForestAmortizedHalving.union ;
var find = disjointset.ForestAmortizedHalving.find ;

var a , b , c , A , B , C ;

A = a = makeset( ) ;
B = b = makeset( ) ;
C = c = makeset( ) ;

find( a ) === find( a ) ; // true
find( a ) === find( b ) ; // false
find( a ) === find( c ) ; // false

find( b ) === find( a ) ; // false
find( b ) === find( b ) ; // true
find( b ) === find( c ) ; // false

find( c ) === find( a ) ; // false
find( c ) === find( b ) ; // false
find( c ) === find( c ) ; // true

A = union( A , B ) ; // union( B , A ) would work too
delete B ;

find( a ) === find( a ) ; // true
find( a ) === find( b ) ; // true
find( a ) === find( c ) ; // false

find( b ) === find( a ) ; // true
find( b ) === find( b ) ; // true
find( b ) === find( c ) ; // false

find( c ) === find( a ) ; // false
find( c ) === find( b ) ; // false
find( c ) === find( c ) ; // true
```

{'fraction_non_alphanumeric': 0.2034350508587627, 'fraction_numerical': 0.00033350008337502084, 'mean_word_length': 3.62095531587057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3968675', 'n_tokens_mistral': 2408, 'n_tokens_neox': 2300, 'n_words': 359}