Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlptoolkit-datastructure

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlptoolkit-datastructure - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

1

dist/heap/Heap.d.ts

@@ -5,2 +5,3 @@ export declare class Heap<T> {

private count;
private n;
constructor(N: number, comparator: <T>(item1: T, item2: T) => number);

@@ -7,0 +8,0 @@ compare(data1: T, data2: T): number;

5

dist/heap/Heap.js

@@ -19,2 +19,3 @@ (function (factory) {

this.count = 0;
this.n = N;
for (let i = 0; i < N; i++) {

@@ -68,3 +69,5 @@ this.array.push();

insert(data) {
this.count = this.count + 1;
if (this.count < this.n) {
this.count = this.count + 1;
}
this.array[this.count - 1] = new HeapNode_1.HeapNode(data);

@@ -71,0 +74,0 @@ this.percolateUp(this.count - 1);

{
"name": "nlptoolkit-datastructure",
"version": "1.0.2",
"version": "1.0.3",
"description": "Simple Data Structures Library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,3 @@ import {HeapNode} from "./HeapNode";

private count: number
private n: number

@@ -14,2 +15,3 @@ constructor(N: number, comparator: <T>(item1: T, item2: T) => number){

this.count = 0
this.n = N
for (let i = 0; i < N; i++){

@@ -69,3 +71,5 @@ this.array.push()

public insert(data: T){
this.count = this.count + 1
if (this.count < this.n) {
this.count = this.count + 1
}
this.array[this.count - 1] = new HeapNode<T>(data)

@@ -72,0 +76,0 @@ this.percolateUp(this.count - 1)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc