Skip to content

A simple js class to represent potentially large binary vectors as integers, and realise operations such as intersection through basic binary operations for efficiency. Used in FCA.

License

Notifications You must be signed in to change notification settings

mdaquin/binary_vector_operations_js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Efficient binary vector operations in Javascript

This is a simple javascript class to represent potentially large binary vectors as a set of integers, and realise operations such as intersection through basic binary operations for efficiency. This was developped based on the need of using formal concept analysis (FCA) in javascript efficiently.

Usage is relatively simple: Instanciate the class with an actual binary vector (i.e. an array of booleans) and apply operations, for example:

var bv1 = new BinaryVector([false,false,true,true,true,true]);
var bv2 = new BinaryVector([true,false,true,true,false,false]);
var bv1ibv2 = bv1.intersection(bv2);
console.log(bv1ubv2.toString());

See test.html for basic tests. This was also tested on an FCA framework (TBC).

About

A simple js class to represent potentially large binary vectors as integers, and realise operations such as intersection through basic binary operations for efficiency. Used in FCA.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published