Useful algorithms and Data structures written in typescript.
sularome / typescript-algorithms-and-data-structures Goto Github PK
View Code? Open in Web Editor NEWUseful algorithms and Data structures written in TypeScript.
License: MIT License
Useful algorithms and Data structures written in TypeScript.
License: MIT License
I am trying to use the getIndexes function of BitMatrix where the number of rows > number of columns. When calling getIndexes(true) the function fails with the error RangeError: Column index is incorrect.
Is it required that the dimensions of the BitMatrix be equal?
I ran the test below (based on exiting test that verifies getIndexes(true) and reproduced the error.
it("be able to get set bits per column when column count < row count", function () {
const bm = new BitMatrix(100, 10);
bm.set(2, 1, true);
bm.set(3, 10, true);
expect(bm.getIndexes(true)[0]).toEqual([]);
expect(bm.getIndexes(true)[1]).toEqual([2]);
expect(bm.getIndexes(true)[10]).toEqual([3]);
bm.set(4, 9, true);
expect(bm.getIndexes(true)[0]).toEqual([]);
expect(bm.getIndexes(true)[1]).toEqual([2]);
expect(bm.getIndexes(true)[9]).toEqual([4]);
expect(bm.getIndexes(true)[10]).toEqual([3]);
bm.set(4, 9, false);
expect(bm.getIndexes(true)[0]).toEqual([]);
expect(bm.getIndexes(true)[1]).toEqual([2]);
expect(bm.getIndexes(true)[9]).toEqual([]);
expect(bm.getIndexes(true)[10]).toEqual([3]);
});
I was wondering if this module is available on npmjs? Could not find a reference using name assigned in package.json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.