Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

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:

varbv1=newBinaryVector([false,false,true,true,true,true]);varbv2=newBinaryVector([true,false,true,true,false,false]);varbv1ibv2=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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages