Skip to content

Commit

Permalink
Updates:
Browse files Browse the repository at this point in the history
- Fix bug in LevelOrderSegmentTree
Removing an element did not trigger a size reduction for the tree as
intended in pop(). Once resized, the pointers were also not being
updated correctly in shrink().
  • Loading branch information
havelessbemore committed Jun 17, 2021
1 parent 351eddf commit 20d3f8b
Show file tree
Hide file tree
Showing 39 changed files with 350 additions and 350 deletions.
2 changes: 1 addition & 1 deletion dist/dastal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dastal.min.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dastal - v4.1.0
dastal - v4.1.1

# dastal - v4.1.0
# dastal - v4.1.1

## Table of contents

Expand Down Expand Up @@ -95,7 +95,7 @@ the inputs, depending on the use case.

#### Defined in

[src/index.ts:21](https://github.com/havelessbemore/dastal/blob/d5a812e/src/index.ts#L21)
[src/index.ts:21](https://github.com/havelessbemore/dastal/blob/351eddf/src/index.ts#L21)

___

Expand Down Expand Up @@ -137,7 +137,7 @@ A function used to determine the order of a set of elements.

#### Defined in

[src/index.ts:33](https://github.com/havelessbemore/dastal/blob/d5a812e/src/index.ts#L33)
[src/index.ts:33](https://github.com/havelessbemore/dastal/blob/351eddf/src/index.ts#L33)

## Functions

Expand All @@ -161,4 +161,4 @@ obj is Collection<unknown\>

#### Defined in

[src/collection/index.ts:15](https://github.com/havelessbemore/dastal/blob/d5a812e/src/collection/index.ts#L15)
[src/collection/index.ts:15](https://github.com/havelessbemore/dastal/blob/351eddf/src/collection/index.ts#L15)
32 changes: 16 additions & 16 deletions docs/classes/aatree.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[dastal - v4.1.0](../README.md) / AATree
[dastal - v4.1.1](../README.md) / AATree

# Class: AATree<T\>

Expand Down Expand Up @@ -75,7 +75,7 @@ Instantiate a tree.

#### Defined in

[src/tree/aaTree.ts:56](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L56)
[src/tree/aaTree.ts:56](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L56)

**new AATree**<T\>(`compareFn`, `allowDuplicates`, `elements?`)

Expand All @@ -97,7 +97,7 @@ Instantiate a tree.

#### Defined in

[src/tree/aaTree.ts:63](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L63)
[src/tree/aaTree.ts:63](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L63)

## Accessors

Expand All @@ -117,7 +117,7 @@ The number of elements in the collection.

#### Defined in

[src/tree/aaTree.ts:183](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L183)
[src/tree/aaTree.ts:183](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L183)

## Methods

Expand All @@ -141,7 +141,7 @@ An iterator through the list

#### Defined in

[src/tree/aaTree.ts:199](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L199)
[src/tree/aaTree.ts:199](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L199)

___

Expand All @@ -167,7 +167,7 @@ Inserts an element into the tree.

#### Defined in

[src/tree/aaTree.ts:87](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L87)
[src/tree/aaTree.ts:87](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L87)

___

Expand All @@ -187,7 +187,7 @@ Removes all elements.

#### Defined in

[src/tree/aaTree.ts:117](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L117)
[src/tree/aaTree.ts:117](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L117)

___

Expand All @@ -205,7 +205,7 @@ ___

#### Defined in

[src/tree/aaTree.ts:122](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L122)
[src/tree/aaTree.ts:122](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L122)

___

Expand All @@ -231,7 +231,7 @@ Delete an element from the tree.

#### Defined in

[src/tree/aaTree.ts:126](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L126)
[src/tree/aaTree.ts:126](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L126)

___

Expand All @@ -257,7 +257,7 @@ Check if an element is in the tree.

#### Defined in

[src/tree/aaTree.ts:139](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L139)
[src/tree/aaTree.ts:139](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L139)

___

Expand All @@ -277,7 +277,7 @@ Get the maximum element.

#### Defined in

[src/tree/aaTree.ts:143](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L143)
[src/tree/aaTree.ts:143](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L143)

___

Expand All @@ -297,7 +297,7 @@ Get the minimum element.

#### Defined in

[src/tree/aaTree.ts:147](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L147)
[src/tree/aaTree.ts:147](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L147)

___

Expand All @@ -317,7 +317,7 @@ Remove the maximum element.

#### Defined in

[src/tree/aaTree.ts:151](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L151)
[src/tree/aaTree.ts:151](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L151)

___

Expand All @@ -337,7 +337,7 @@ Remove the minimum element.

#### Defined in

[src/tree/aaTree.ts:167](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L167)
[src/tree/aaTree.ts:167](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L167)

___

Expand All @@ -359,7 +359,7 @@ Iterate through the tree in sorted order (i.e in-order traversal).

#### Defined in

[src/tree/aaTree.ts:187](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L187)
[src/tree/aaTree.ts:187](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L187)

___

Expand All @@ -386,4 +386,4 @@ Update a specific element.

#### Defined in

[src/tree/aaTree.ts:205](https://github.com/havelessbemore/dastal/blob/d5a812e/src/tree/aaTree.ts#L205)
[src/tree/aaTree.ts:205](https://github.com/havelessbemore/dastal/blob/351eddf/src/tree/aaTree.ts#L205)
52 changes: 26 additions & 26 deletions docs/classes/arraylist.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[dastal - v4.1.0](../README.md) / ArrayList
[dastal - v4.1.1](../README.md) / ArrayList

# Class: ArrayList<T\>

Expand Down Expand Up @@ -70,7 +70,7 @@ Instantiate the list.

#### Defined in

[src/list/arrayList.ts:13](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L13)
[src/list/arrayList.ts:13](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L13)

## Accessors

Expand All @@ -90,7 +90,7 @@ The number of elements in the collection.

#### Defined in

[src/list/arrayList.ts:113](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L113)
[src/list/arrayList.ts:113](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L113)

## Methods

Expand All @@ -114,7 +114,7 @@ An iterator through the list

#### Defined in

[src/list/arrayList.ts:136](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L136)
[src/list/arrayList.ts:136](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L136)

___

Expand All @@ -141,7 +141,7 @@ Add the element at the specified index.

#### Defined in

[src/list/arrayList.ts:23](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L23)
[src/list/arrayList.ts:23](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L23)

___

Expand All @@ -168,7 +168,7 @@ Add elements at the specified index.

#### Defined in

[src/list/arrayList.ts:30](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L30)
[src/list/arrayList.ts:30](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L30)

___

Expand All @@ -188,7 +188,7 @@ Removes all elements.

#### Defined in

[src/list/arrayList.ts:37](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L37)
[src/list/arrayList.ts:37](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L37)

___

Expand All @@ -214,7 +214,7 @@ Combines the list with multiple iterables into a new list. Does not modify the e

#### Defined in

[src/list/arrayList.ts:41](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L41)
[src/list/arrayList.ts:41](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L41)

___

Expand Down Expand Up @@ -248,7 +248,7 @@ the copied sequence will be trimmed to fit list.size

#### Defined in

[src/list/arrayList.ts:49](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L49)
[src/list/arrayList.ts:49](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L49)

___

Expand Down Expand Up @@ -279,7 +279,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:57](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L57)
[src/list/arrayList.ts:57](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L57)

___

Expand All @@ -305,7 +305,7 @@ Return the element at the specified index.

#### Defined in

[src/list/arrayList.ts:64](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L64)
[src/list/arrayList.ts:64](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L64)

___

Expand All @@ -332,7 +332,7 @@ Update the element at the specified index.

#### Defined in

[src/list/arrayList.ts:68](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L68)
[src/list/arrayList.ts:68](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L68)

___

Expand All @@ -352,7 +352,7 @@ Retrieves and removes the end of the list.

#### Defined in

[src/list/arrayList.ts:77](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L77)
[src/list/arrayList.ts:77](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L77)

___

Expand All @@ -378,7 +378,7 @@ Inserts the specified value into the end of the list

#### Defined in

[src/list/arrayList.ts:81](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L81)
[src/list/arrayList.ts:81](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L81)

___

Expand Down Expand Up @@ -407,7 +407,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:85](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L85)
[src/list/arrayList.ts:85](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L85)

___

Expand Down Expand Up @@ -437,7 +437,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:89](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L89)
[src/list/arrayList.ts:89](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L89)

___

Expand All @@ -464,7 +464,7 @@ Update the element at the specified index.

#### Defined in

[src/list/arrayList.ts:100](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L100)
[src/list/arrayList.ts:100](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L100)

___

Expand All @@ -484,7 +484,7 @@ Retrieves and removes the first element in the list.

#### Defined in

[src/list/arrayList.ts:109](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L109)
[src/list/arrayList.ts:109](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L109)

___

Expand Down Expand Up @@ -514,7 +514,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:117](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L117)
[src/list/arrayList.ts:117](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L117)

___

Expand All @@ -540,7 +540,7 @@ Sorts the elements in place.

#### Defined in

[src/list/arrayList.ts:125](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L125)
[src/list/arrayList.ts:125](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L125)

___

Expand Down Expand Up @@ -569,7 +569,7 @@ Returns any deleted elements.

#### Defined in

[src/list/arrayList.ts:121](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L121)
[src/list/arrayList.ts:121](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L121)

___

Expand All @@ -595,7 +595,7 @@ Inserts the specified value into the front of the list

#### Defined in

[src/list/arrayList.ts:140](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L140)
[src/list/arrayList.ts:140](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L140)

___

Expand All @@ -621,7 +621,7 @@ Update the elements of the list

#### Defined in

[src/list/arrayList.ts:144](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L144)
[src/list/arrayList.ts:144](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L144)

**update**(`min`, `callback`): [ArrayList](arraylist.md)<T\>

Expand All @@ -647,7 +647,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:145](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L145)
[src/list/arrayList.ts:145](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L145)

**update**(`min`, `max`, `callback`): [ArrayList](arraylist.md)<T\>

Expand All @@ -674,7 +674,7 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:146](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L146)
[src/list/arrayList.ts:146](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L146)

___

Expand Down Expand Up @@ -706,4 +706,4 @@ end of the list. For example, -2 refers to the second to last element of the lis

#### Defined in

[src/list/arrayList.ts:174](https://github.com/havelessbemore/dastal/blob/d5a812e/src/list/arrayList.ts#L174)
[src/list/arrayList.ts:174](https://github.com/havelessbemore/dastal/blob/351eddf/src/list/arrayList.ts#L174)
Loading

0 comments on commit 20d3f8b

Please sign in to comment.