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

astl

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astl - npm Package Compare versions

Comparing version 0.0.13 to 0.0.15

experimental/container/LightMap.ts

2

container/Deque.ts

@@ -555,3 +555,3 @@ import { Vector } from "./Vector";

export class ReverseIterator<T>
extends ReverseIteratorBase<T, Deque<T>, Deque<T>, Iterator<T>, ReverseIterator<T>, T>
extends ReverseIteratorBase<T, Deque<T>, Iterator<T>, ReverseIterator<T>, T>
{

@@ -558,0 +558,0 @@ /* ---------------------------------------------------------

import { MapElementList } from "../internal/container/associative/MapElementList";
import { IteratorHashBuckets } from "../internal/hash/IteratorHashBuckets";
import { HashBuckets } from "../internal/hash/HashBuckets";

@@ -18,3 +18,3 @@ import { IForwardIterator } from "../iterator/IForwardIterator";

private data_: MapElementList<Key, T, true, HashMap<Key, T>> = new MapElementList(<HashMap<Key, T>>this);
private buckets_: IteratorHashBuckets<Key, HashMap.Iterator<Key, T>>;
private buckets_: HashBuckets<Key, HashMap.Iterator<Key, T>>;

@@ -26,3 +26,3 @@ /* ---------------------------------------------------------

{
this.buckets_ = new IteratorHashBuckets(hasher, predicator, it => it.first);
this.buckets_ = new HashBuckets(hasher, predicator, it => it.first);
}

@@ -56,3 +56,3 @@

// SWAP BUCKETS
const buckets: IteratorHashBuckets<Key, HashMap.Iterator<Key, T>> = this.buckets_;
const buckets: HashBuckets<Key, HashMap.Iterator<Key, T>> = this.buckets_;
this.buckets_ = obj.buckets_;

@@ -151,3 +151,3 @@ obj.buckets_ = buckets;

{
return this.buckets_.length();
return this.buckets_.row_size();
}

@@ -154,0 +154,0 @@

import { MapElementList } from "../internal/container/associative/MapElementList";
import { IteratorHashBuckets } from "../internal/hash/IteratorHashBuckets";
import { HashBuckets } from "../internal/hash/HashBuckets";

@@ -17,3 +17,3 @@ import { IForwardIterator } from "../iterator/IForwardIterator";

private data_: MapElementList<Key, T, false, HashMultiMap<Key, T>> = new MapElementList(<HashMultiMap<Key, T>>this);
private buckets_: IteratorHashBuckets<Key, HashMultiMap.Iterator<Key, T>>;
private buckets_: HashBuckets<Key, HashMultiMap.Iterator<Key, T>>;

@@ -25,3 +25,3 @@ /* ---------------------------------------------------------

{
this.buckets_ = new IteratorHashBuckets(hasher, predicator, it => it.first);
this.buckets_ = new HashBuckets(hasher, predicator, it => it.first);
}

@@ -55,3 +55,3 @@

// SWAP BUCKETS
const buckets: IteratorHashBuckets<Key, HashMultiMap.Iterator<Key, T>> = this.buckets_;
const buckets: HashBuckets<Key, HashMultiMap.Iterator<Key, T>> = this.buckets_;
this.buckets_ = obj.buckets_;

@@ -113,13 +113,6 @@ obj.buckets_ = buckets;

@inline
public count(key: Key): usize
{
const index: usize = this.bucket(key);
const bucket: Vector<HashMultiMap.Iterator<Key, T>> = this.buckets_.at(index);
let ret: usize = 0;
for (let i: usize = 0; i < bucket.size(); ++i)
if (this.key_eq()(key, bucket.at(i).first) === true)
++ret;
return ret;
return this.buckets_.count(key);
}

@@ -148,3 +141,3 @@

{
return this.buckets_.length();
return this.buckets_.row_size();
}

@@ -151,0 +144,0 @@

import { SetElementList } from "../internal/container/associative/SetElementList";
import { IteratorHashBuckets } from "../internal/hash/IteratorHashBuckets";
import { HashBuckets } from "../internal/hash/HashBuckets";

@@ -15,3 +15,3 @@ import { IForwardIterator } from "../iterator/IForwardIterator";

private data_: SetElementList<Key, false, HashMultiSet<Key>> = new SetElementList(<HashMultiSet<Key>>this);
private buckets_: IteratorHashBuckets<Key, HashMultiSet.Iterator<Key>>;
private buckets_: HashBuckets<Key, HashMultiSet.Iterator<Key>>;

@@ -23,3 +23,3 @@ /* ---------------------------------------------------------

{
this.buckets_ = new IteratorHashBuckets(hasher, predicator, it => it.value);
this.buckets_ = new HashBuckets(hasher, predicator, it => it.value);
}

@@ -53,3 +53,3 @@

// SWAP BUCKETS
const buckets: IteratorHashBuckets<Key, HashMultiSet.Iterator<Key>> = this.buckets_;
const buckets: HashBuckets<Key, HashMultiSet.Iterator<Key>> = this.buckets_;
this.buckets_ = obj.buckets_;

@@ -111,13 +111,6 @@ obj.buckets_ = buckets;

@inline
public count(key: Key): usize
{
const index: usize = this.bucket(key);
const bucket: Vector<HashMultiSet.Iterator<Key>> = this.buckets_.at(index);
let ret: usize = 0;
for (let i: usize = 0; i < bucket.size(); ++i)
if (this.key_eq()(key, bucket.at(i).value) === true)
++ret;
return ret;
return this.buckets_.count(key);
}

@@ -146,3 +139,3 @@

{
return this.buckets_.length();
return this.buckets_.row_size();
}

@@ -149,0 +142,0 @@

import { SetElementList } from "../internal/container/associative/SetElementList";
import { IteratorHashBuckets } from "../internal/hash/IteratorHashBuckets";
import { HashBuckets } from "../internal/hash/HashBuckets";

@@ -15,3 +15,3 @@ import { IForwardIterator } from "../iterator/IForwardIterator";

private data_: SetElementList<Key, true, HashSet<Key>> = new SetElementList(<HashSet<Key>>this);
private buckets_: IteratorHashBuckets<Key, HashSet.Iterator<Key>>;
private buckets_: HashBuckets<Key, HashSet.Iterator<Key>>;

@@ -23,3 +23,3 @@ /* ---------------------------------------------------------

{
this.buckets_ = new IteratorHashBuckets(hasher, predicator, it => it.value);
this.buckets_ = new HashBuckets(hasher, predicator, it => it.value);
}

@@ -53,3 +53,3 @@

// SWAP BUCKETS
const buckets: IteratorHashBuckets<Key, HashSet.Iterator<Key>> = this.buckets_;
const buckets: HashBuckets<Key, HashSet.Iterator<Key>> = this.buckets_;
this.buckets_ = obj.buckets_;

@@ -138,3 +138,3 @@ obj.buckets_ = buckets;

{
return this.buckets_.length();
return this.buckets_.row_size();
}

@@ -141,0 +141,0 @@

@@ -476,3 +476,3 @@ import { IForwardIterator } from "../iterator/IForwardIterator";

export class ReverseIterator<T>
extends ReverseBase<T, List<T>, List<T>, Iterator<T>, ReverseIterator<T>, T>
extends ReverseBase<T, List<T>, Iterator<T>, ReverseIterator<T>, T>
{

@@ -479,0 +479,0 @@ @inline

@@ -13,3 +13,3 @@ import { VectorContainer } from "../internal/container/linear/VectorContainer";

@inline
public assign<InputIterator>
public assign<InputIterator extends IForwardIterator<T, InputIterator>>
(first: InputIterator, last: InputIterator): void

@@ -219,3 +219,3 @@ {

export class ReverseIterator<T>
extends ReverseIteratorBase<T, Vector<T>, Vector<T>, Iterator<T>, ReverseIterator<T>, T>
extends ReverseIteratorBase<T, Vector<T>, Iterator<T>, ReverseIterator<T>, T>
{

@@ -222,0 +222,0 @@ /* ---------------------------------------------------------

@@ -1,2 +0,2 @@

import { MapElementVector } from "../../internal/container/associative/MapElementVector";
import { FlatMapElementVector } from "../../internal/container/adaptive/FlatMapElementVector";
import { Comparator } from "../../internal/functional/Comparator";

@@ -14,3 +14,3 @@ import { less } from "../../functional/comparators";

{
private data_: MapElementVector<Key, T, true, FlatMap<Key, T>> = new MapElementVector(<FlatMap<Key, T>>this);
private data_: FlatMapElementVector<Key, T, true, FlatMap<Key, T>> = new FlatMapElementVector(<FlatMap<Key, T>>this);

@@ -44,3 +44,3 @@ /* ---------------------------------------------------------

const data: MapElementVector<Key, T, true, FlatMap<Key, T>> = this.data_;
const data: FlatMapElementVector<Key, T, true, FlatMap<Key, T>> = this.data_;
this.data_ = obj.data_;

@@ -123,3 +123,3 @@ obj.data_ = data;

if (it == this.end())
throw ErrorGenerator.key_nout_found("TreeMap.get()", key);
throw ErrorGenerator.key_nout_found("FlatMap.get()", key);
return it.second;

@@ -208,4 +208,4 @@ }

{
export type Iterator<Key, T> = MapElementVector.Iterator<Key, T, true, FlatMap<Key, T>>;
export type ReverseIterator<Key, T> = MapElementVector.ReverseIterator<Key, T, true, FlatMap<Key, T>>;
export type Iterator<Key, T> = FlatMapElementVector.Iterator<Key, T, true, FlatMap<Key, T>>;
export type ReverseIterator<Key, T> = FlatMapElementVector.ReverseIterator<Key, T, true, FlatMap<Key, T>>;
}

@@ -1,2 +0,2 @@

import { MapElementVector } from "../../internal/container/associative/MapElementVector";
import { FlatMapElementVector } from "../../internal/container/adaptive/FlatMapElementVector";
import { Comparator } from "../../internal/functional/Comparator";

@@ -12,3 +12,3 @@ import { less } from "../../functional/comparators";

{
private data_: MapElementVector<Key, T, false, FlatMultiMap<Key, T>> = new MapElementVector(<FlatMultiMap<Key, T>>this);
private data_: FlatMapElementVector<Key, T, false, FlatMultiMap<Key, T>> = new FlatMapElementVector(<FlatMultiMap<Key, T>>this);

@@ -42,3 +42,3 @@ /* ---------------------------------------------------------

const data: MapElementVector<Key, T, true, FlatMultiMap<Key, T>> = this.data_;
const data: FlatMapElementVector<Key, T, true, FlatMultiMap<Key, T>> = this.data_;
this.data_ = obj.data_;

@@ -191,4 +191,4 @@ obj.data_ = data;

{
export type Iterator<Key, T> = MapElementVector.Iterator<Key, T, false, FlatMultiMap<Key, T>>;
export type ReverseIterator<Key, T> = MapElementVector.ReverseIterator<Key, T, false, FlatMultiMap<Key, T>>;
export type Iterator<Key, T> = FlatMapElementVector.Iterator<Key, T, false, FlatMultiMap<Key, T>>;
export type ReverseIterator<Key, T> = FlatMapElementVector.ReverseIterator<Key, T, false, FlatMultiMap<Key, T>>;
}

@@ -1,2 +0,2 @@

import { SetElementVector } from "../../internal/container/associative/SetElementVector";
import { FlatSetElementVector } from "../../internal/container/adaptive/FlatSetElementVector";
import { Comparator } from "../../internal/functional/Comparator";

@@ -10,3 +10,3 @@ import { less } from "../../functional/comparators";

{
private data_: SetElementVector<Key, false, FlatMultiSet<Key>> = new SetElementVector(<FlatMultiSet<Key>>this);
private data_: FlatSetElementVector<Key, false, FlatMultiSet<Key>> = new FlatSetElementVector(<FlatMultiSet<Key>>this);

@@ -40,3 +40,3 @@ /* ---------------------------------------------------------

const data: SetElementVector<Key, true, FlatMultiSet<Key>> = this.data_;
const data: FlatSetElementVector<Key, true, FlatMultiSet<Key>> = this.data_;
this.data_ = obj.data_;

@@ -190,4 +190,4 @@ obj.data_ = data;

{
export type Iterator<Key> = SetElementVector.Iterator<Key, false, FlatMultiSet<Key>>;
export type ReverseIterator<Key> = SetElementVector.ReverseIterator<Key, false, FlatMultiSet<Key>>;
export type Iterator<Key> = FlatSetElementVector.Iterator<Key, false, FlatMultiSet<Key>>;
export type ReverseIterator<Key> = FlatSetElementVector.ReverseIterator<Key, false, FlatMultiSet<Key>>;
}

@@ -1,2 +0,2 @@

import { SetElementVector } from "../../internal/container/associative/SetElementVector";
import { FlatSetElementVector } from "../../internal/container/adaptive/FlatSetElementVector";
import { Comparator } from "../../internal/functional/Comparator";

@@ -6,3 +6,2 @@ import { less } from "../../functional/comparators";

import { IForwardIterator } from "../../iterator/IForwardIterator";
import { ErrorGenerator } from "../../internal/exception/ErrorGenerator";
import { Pair } from "../../utility/Pair";

@@ -12,3 +11,3 @@

{
public data_: SetElementVector<Key, true, FlatSet<Key>> = new SetElementVector(<FlatSet<Key>>this);
public data_: FlatSetElementVector<Key, true, FlatSet<Key>> = new FlatSetElementVector(<FlatSet<Key>>this);

@@ -42,3 +41,3 @@ /* ---------------------------------------------------------

const data: SetElementVector<Key, true, FlatSet<Key>> = this.data_;
const data: FlatSetElementVector<Key, true, FlatSet<Key>> = this.data_;
this.data_ = obj.data_;

@@ -184,4 +183,4 @@ obj.data_ = data;

{
export type Iterator<Key> = SetElementVector.Iterator<Key, true, FlatSet<Key>>;
export type ReverseIterator<Key> = SetElementVector.ReverseIterator<Key, true, FlatSet<Key>>;
export type Iterator<Key> = FlatSetElementVector.Iterator<Key, true, FlatSet<Key>>;
export type ReverseIterator<Key> = FlatSetElementVector.ReverseIterator<Key, true, FlatSet<Key>>;
}
export * from "./FlatMap";
export * from "./FlatMultiMap";
export * from "./FlatMultiSet";
export * from "./FlatSet";
export * from "./FlatSet";
export * from "./LightMap";
export * from "./LightSet";
import { IContainer, IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
export interface IAssociativeContainer<Key, T extends InputT,
SourceT extends IAssociativeContainer<Key, T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IAssociativeContainer<Key, T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -11,0 +10,0 @@ count(key: Key): usize;

@@ -1,2 +0,2 @@

import { IContainer, IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IAssociativeContainer } from "./IAssociativeContainer";

@@ -8,8 +8,7 @@

export interface IHashContainer<Key, T extends InputT,
SourceT extends IHashContainer<Key, T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IHashContainer<Key, T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IAssociativeContainer<Key, T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IAssociativeContainer<Key, T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -16,0 +15,0 @@ hash_function(): Hasher<Key>;

@@ -1,14 +0,12 @@

import { IMapContainer } from "./IMapContainer";
import { MapElementList } from "./MapElementList";
import { IMapContainer, IMapContainerIterator, IMapContainerReverseIterator } from "./IMapContainer";
import { Hasher } from "../../functional/Hasher";
import { BinaryPredicator } from "../../functional/BinaryPredicator";
import { Hasher } from "../../functional/Hasher";
export interface IHashMap<Key, T,
Unique extends boolean,
SourceT extends IHashMap<Key, T, Unique, SourceT>>
extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
MapElementList.Iterator<Key, T, Unique, SourceT>,
MapElementList.ReverseIterator<Key, T, Unique, SourceT>>
SourceT extends IHashMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>
{

@@ -28,2 +26,20 @@ hash_function(): Hasher<Key>;

rehash(n: usize): void;
}
export interface IHashMapIterator<Key, T,
Unique extends boolean,
SourceT extends IHashMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>
{
}
export interface IHashMapReverseIterator<Key, T,
Unique extends boolean,
SourceT extends IHashMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>
{
}

@@ -1,3 +0,2 @@

import { ISetContainer } from "./ISetContainer";
import { SetElementList } from "./SetElementList";
import { ISetContainer, ISetContainerIterator, ISetContainerReverseIterator } from "./ISetContainer";

@@ -9,7 +8,6 @@ import { BinaryPredicator } from "../../functional/BinaryPredicator";

Unique extends boolean,
SourceT extends IHashSet<Key, Unique, SourceT>>
extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
SetElementList.Iterator<Key, Unique, SourceT>,
SetElementList.ReverseIterator<Key, Unique, SourceT>>
SourceT extends IHashSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>
{

@@ -29,2 +27,20 @@ hash_function(): Hasher<Key>;

rehash(n: usize): void;
}
export interface IHashSetIterator<Key,
Unique extends boolean,
SourceT extends IHashSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>
{
}
export interface IHashSetReverseIterator<Key,
Unique extends boolean,
SourceT extends IHashSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IHashSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IHashSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>
{
}

@@ -1,2 +0,2 @@

import { IContainer, IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IAssociativeContainer } from "./IAssociativeContainer";

@@ -11,9 +11,8 @@

Unique extends boolean,
SourceT extends IMapContainer<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IAssociativeContainer<Key, Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>
SourceT extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IAssociativeContainer<Key, Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>
{
// emplace(key: Key, value: T): IMapContainerEmplaceRet<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>;
// emplace(key: Key, value: T): IMapContainerEmplaceRet<Key, T, Unique, SourceT, IteratorT, ReverseT>;
emplace_hint(hint: IteratorT, key: Key, value: T): IteratorT;

@@ -26,7 +25,6 @@ insert_range<InputIterator extends IForwardIterator<IPair<Key, T>, InputIterator>>

Unique extends boolean,
SourceT extends IMapContainer<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IContainerIterator<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>
SourceT extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IContainerIterator<Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>
{

@@ -39,7 +37,6 @@ readonly first: Key;

Unique extends boolean,
SourceT extends IMapContainer<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IContainerReverseIterator<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>
SourceT extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IContainerReverseIterator<Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>
{

@@ -52,8 +49,8 @@ readonly first: Key;

// Unique extends boolean,
// SourceT extends IMapContainer<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
// ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
// IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
// ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
// SourceT extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>,
// // ContainerT extends IContainer<Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>,
// IteratorT extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
// ReverseT extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
// = Unique extends true
// ? Pair<IteratorT, boolean>
// : IteratorT;

@@ -1,2 +0,2 @@

import { IContainer, IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";
import { IAssociativeContainer } from "./IAssociativeContainer";

@@ -9,9 +9,9 @@

Unique extends boolean,
SourceT extends ISetContainer<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IAssociativeContainer<Key, Key, SourceT, ContainerT, IteratorT, ReverseT, Key>
SourceT extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>,
// ContainerT extends IContainer<Key, SourceT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends IAssociativeContainer<Key, Key, SourceT, IteratorT, ReverseT, Key>
{
// emplace(key: Key): ISetContainerEmplaceRet<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>;
// emplace(key: Key): ISetContainerEmplaceRet<Key, Unique, SourceT, IteratorT, ReverseT>;
insert_hint(hint: IteratorT, key: Key): IteratorT;

@@ -24,7 +24,7 @@ insert_range<InputIterator extends IForwardIterator<Key, InputIterator>>

Unique extends boolean,
SourceT extends ISetContainer<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IContainerIterator<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>
SourceT extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>,
// ContainerT extends IContainer<Key, SourceT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends IContainerIterator<Key, SourceT, IteratorT, ReverseT, Key>
{

@@ -35,7 +35,7 @@ }

Unique extends boolean,
SourceT extends ISetContainer<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IContainerReverseIterator<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>
SourceT extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>,
// ContainerT extends IContainer<Key, SourceT, IteratorT, ReverseT, Key>,
IteratorT extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends IContainerReverseIterator<Key, SourceT, IteratorT, ReverseT, Key>
{

@@ -46,8 +46,8 @@ }

// Unique extends boolean,
// SourceT extends ISetContainer<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
// ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
// IteratorT extends ISetContainerIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
// ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
// SourceT extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>,
// // ContainerT extends IContainer<Key, SourceT, IteratorT, ReverseT, Key>,
// IteratorT extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
// ReverseT extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
// = Unique extends true
// ? Pair<IteratorT, boolean>
// : IteratorT;

@@ -9,8 +9,8 @@ import { IContainer, IContainerIterator, IContainerReverseIterator } from "../linear/IContainer";

export interface ITreeContainer<Key, T extends InputT,
SourceT extends ITreeContainer<Key, T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends ITreeContainer<Key, T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IAssociativeContainer<Key, T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IAssociativeContainer<Key, T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -17,0 +17,0 @@ key_comp(): Comparator<Key>;

import { IMapContainer, IMapContainerIterator, IMapContainerReverseIterator } from "./IMapContainer";
import { IContainer } from "../linear/IContainer";
import { IPair } from "../../../utility/IPair";
import { Pair } from "../../../utility/Pair";
import { Entry } from "../../../utility/Entry";
import { Comparator } from "../../functional/Comparator";

@@ -11,7 +8,6 @@

Unique extends boolean,
SourceT extends ITreeMap<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IMapContainer<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>
{

@@ -27,7 +23,6 @@ key_comp(): Comparator<Key>;

Unique extends boolean,
SourceT extends ITreeMap<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IMapContainerIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainerIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>
{

@@ -40,7 +35,6 @@ readonly first: Key;

Unique extends boolean,
SourceT extends ITreeMap<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Entry<Key, T>, SourceT, ContainerT, IteratorT, ReverseT, IPair<Key, T>>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends IMapContainerReverseIterator<Key, T, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeMap<Key, T, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeMapIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeMapReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>>
extends IMapContainerReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>
{

@@ -47,0 +41,0 @@ readonly first: Key;

import { ISetContainer, ISetContainerIterator, ISetContainerReverseIterator } from "./ISetContainer";
import { IContainer } from "../linear/IContainer";

@@ -9,7 +8,6 @@ import { Comparator } from "../../functional/Comparator";

Unique extends boolean,
SourceT extends ITreeSet<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends ISetContainer<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainer<Key, Unique, SourceT, IteratorT, ReverseT>
{

@@ -25,7 +23,6 @@ key_comp(): Comparator<Key>;

Unique extends boolean,
SourceT extends ITreeSet<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends ISetContainerIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainerIterator<Key, Unique, SourceT, IteratorT, ReverseT>
{

@@ -36,8 +33,7 @@ }

Unique extends boolean,
SourceT extends ITreeSet<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ContainerT extends IContainer<Key, SourceT, ContainerT, IteratorT, ReverseT, Key>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>>
extends ISetContainerReverseIterator<Key, Unique, SourceT, ContainerT, IteratorT, ReverseT>
SourceT extends ITreeSet<Key, Unique, SourceT, IteratorT, ReverseT>,
IteratorT extends ITreeSetIterator<Key, Unique, SourceT, IteratorT, ReverseT>,
ReverseT extends ITreeSetReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>>
extends ISetContainerReverseIterator<Key, Unique, SourceT, IteratorT, ReverseT>
{
}

@@ -14,3 +14,2 @@ import { IMapContainer } from "./IMapContainer";

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
MapElementList.Iterator<Key, T, Unique, SourceT>,

@@ -222,3 +221,2 @@ MapElementList.ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -260,3 +258,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -278,4 +275,3 @@ ReverseIterator<Key, T, Unique, SourceT>>>

Unique extends boolean,
SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
SourceT extends IMapContainer<Key, T, Unique, SourceT,
Iterator<Key, T, Unique, SourceT>,

@@ -291,4 +287,3 @@ ReverseIterator<Key, T, Unique, SourceT>>>

Unique extends boolean,
SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
SourceT extends IMapContainer<Key, T, Unique, SourceT,
Iterator<Key, T, Unique, SourceT>,

@@ -359,3 +354,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -372,3 +366,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -385,3 +378,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -398,3 +390,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT extends IMapContainer<Key, T, Unique, SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -404,3 +395,2 @@ ReverseIterator<Key, T, Unique, SourceT>>>

SourceT,
MapElementList<Key, T, Unique, SourceT>,
Iterator<Key, T, Unique, SourceT>,

@@ -407,0 +397,0 @@ ReverseIterator<Key, T, Unique, SourceT>,

@@ -5,2 +5,3 @@ import { ISetContainer } from "./ISetContainer";

import { ReverseIteratorBase as ReverseBase } from "../../iterator/ReverseIteratorBase";
import { Repeater } from "../../iterator/disposable/Repeater";

@@ -12,3 +13,2 @@ import { distance } from "../../../iterator/global";

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
SetElementList.Iterator<Key, Unique, SourceT>,

@@ -215,3 +215,2 @@ SetElementList.ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -253,3 +252,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -272,3 +270,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -285,3 +282,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -334,3 +330,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -347,3 +342,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -360,3 +354,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -373,3 +366,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT extends ISetContainer<Key, Unique, SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -379,3 +371,2 @@ ReverseIterator<Key, Unique, SourceT>>>

SourceT,
SetElementList<Key, Unique, SourceT>,
Iterator<Key, Unique, SourceT>,

@@ -382,0 +373,0 @@ ReverseIterator<Key, Unique, SourceT>,

@@ -5,8 +5,8 @@ import { IContainer } from "./IContainer";

export declare interface IArrayContainer<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IArrayContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends IArrayContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends ILinearContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends ILinearContainer<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -19,8 +19,8 @@ nth(index: usize): IteratorT;

export interface IArrayContainerIterator<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IArrayContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends IArrayContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends ILinearContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends ILinearContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -32,8 +32,8 @@ index(): usize;

export interface IArrayContainerReverseIterator<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IArrayContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends IArrayContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IArrayContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IArrayContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends ILinearContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends ILinearContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -40,0 +40,0 @@ index(): usize;

@@ -5,6 +5,6 @@ import { IReversableIterator } from "../../../iterator/IReversableIterator";

export declare interface IContainer<T extends PElem,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
// ContainerT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, PElem>,
PElem>

@@ -31,6 +31,6 @@ {

export interface IContainerIterator<T extends PElem,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
// ContainerT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, PElem>,
PElem>

@@ -44,6 +44,6 @@ extends IReversableIterator<T, IteratorT, ReverseT>

export interface IContainerReverseIterator<T extends PElem,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, PElem>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
// ContainerT extends IContainer<T, SourceT, IteratorT, ReverseT, PElem>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, PElem>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, PElem>,
PElem>

@@ -50,0 +50,0 @@ extends IReverseIterator<T, IteratorT, ReverseT>

@@ -5,8 +5,8 @@ import { IContainer, IContainerIterator, IContainerReverseIterator } from "./IContainer";

export declare interface ILinearContainer<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends ILinearContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends ILinearContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -27,8 +27,8 @@ resize(n: usize): void;

export interface ILinearContainerIterator<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends ILinearContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends ILinearContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>
{

@@ -38,9 +38,9 @@ }

export interface ILinearContainerReverseIterator<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends ILinearContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends ILinearContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends ILinearContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends ILinearContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>
extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>
extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>
{
}

@@ -37,3 +37,4 @@ import { distance } from "../../../iterator/global";

{
this._Reserve(capacity, this.size());
if (capacity > this.capacity())
this._Reserve(capacity, this.size());
}

@@ -40,0 +41,0 @@

@@ -5,2 +5,3 @@ import { Vector } from "../../container/Vector";

import { Hasher } from "../functional/Hasher";
import { BinaryPredicator } from "../functional/BinaryPredicator";

@@ -10,3 +11,4 @@ export class HashBuckets<Key, Elem>

private readonly hasher_: Hasher<Key>;
protected readonly fetcher_: (elem: Elem) => Key;
private readonly predicator_: BinaryPredicator<Key>;
private readonly fetcher_: (elem: Elem) => Key;

@@ -20,5 +22,6 @@ private max_load_factor_: f64;

--------------------------------------------------------- */
public constructor(hasher: Hasher<Key>, fetcher: (elem: Elem) => Key)
public constructor(hasher: Hasher<Key>, pred: BinaryPredicator<Key>, fetcher: (elem: Elem) => Key)
{
this.hasher_ = hasher;
this.predicator_ = pred;
this.fetcher_ = fetcher;

@@ -28,3 +31,2 @@

this.data_ = new Vector();
this.size_ = 0;

@@ -37,4 +39,2 @@ this.initialize();

this.data_.clear();
this.size_ = 0;
this.initialize();

@@ -47,2 +47,6 @@ }

const log: f64 = Math.log2(<f64>length);
if (log !== Math.floor(log))
length = <usize>(Math.pow(2, Math.ceil(log)));
// CREATE NEW BUCKET

@@ -83,2 +87,3 @@ const data: Vector<Vector<Elem>> = new Vector();

{
this.size_ = 0;
for (let i: usize = 0; i < MIN_BUCKET_COUNT; ++i)

@@ -92,4 +97,10 @@ this.data_.push_back(new Vector());

@inline
public length(): usize
public size(): usize
{
return this.size_;
}
@inline
public row_size(): usize
{
return this.data_.size();

@@ -101,3 +112,3 @@ }

{
return <usize>(this.length() * this.max_load_factor_);
return <usize>(this.row_size() * this.max_load_factor_);
}

@@ -114,3 +125,3 @@

{
return this.size_ / this.length();
return this.size_ / this.row_size();
}

@@ -136,11 +147,53 @@

@inline
public key_eq(): BinaryPredicator<Key>
{
return this.predicator_;
}
/* ---------------------------------------------------------
ELEMENTS I/O
FINDERS
--------------------------------------------------------- */
@inline()
private index_by_key(key: Key): usize
{
return this.hash_function()(key) & (this.row_size() - 1);
}
@inline
private index(elem: Elem): usize
private index_by_value(elem: Elem): usize
{
return this.hasher_(this.fetcher_(elem)) % this.length();
return this.index_by_key(this.fetcher_(elem));
}
public find(key: Key): Elem | null
{
const index: usize = this.index_by_key(key);
const bucket: Vector<Elem> = this.at(index);
for (let i: usize = 0; i < bucket.size(); ++i)
{
const it: Elem = bucket.at(i);
if (this.predicator_(key, this.fetcher_(it)) === true)
return it;
}
return null;
}
public count(key: Key): usize
{
const index: usize = this.index_by_key(key);
const bucket: Vector<Elem> = this.at(index);
let ret: usize = 0;
for (let i: usize = 0; i < bucket.size(); ++i)
if (this.key_eq()(key, this.fetcher_(bucket.at(i))) === true)
++ret;
return ret;
}
/* ---------------------------------------------------------
ELEMENTS I/O
--------------------------------------------------------- */
public insert(val: Elem): void

@@ -152,9 +205,11 @@ {

const index: usize = this.index(val);
this.data_.at(index).push_back(val);
const index: usize = this.index_by_value(val);
const bucket: Vector<Elem> = this.data_.at(index);
bucket.push_back(val);
}
public erase(val: Elem): void
public erase(val: Elem): boolean
{
const index: usize = this.index(val);
const index: usize = this.index_by_value(val);
const bucket: Vector<Elem> = this.data_.at(index);

@@ -167,8 +222,10 @@

--this.size_;
break;
return true;
}
return false;
}
}
const MIN_BUCKET_COUNT: usize = 10;
const MIN_BUCKET_COUNT: usize = 8;
const DEFAULT_MAX_FACTOR: f64 = 1.0;
import { IContainer, IContainerIterator, IContainerReverseIterator } from "../container/linear/IContainer";
export abstract class ReverseIteratorBase<T extends InputT,
SourceT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ContainerT extends IContainer<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, ContainerT, IteratorT, ReverseT, InputT>,
SourceT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
// ContainerT extends IContainer<T, SourceT, IteratorT, ReverseT, InputT>,
IteratorT extends IContainerIterator<T, SourceT, IteratorT, ReverseT, InputT>,
ReverseT extends IContainerReverseIterator<T, SourceT, IteratorT, ReverseT, InputT>,
InputT>

@@ -9,0 +9,0 @@ {

@@ -9,3 +9,3 @@ {

},
"version": "0.0.13",
"version": "0.0.15",
"ascMain": "./index.ts",

@@ -18,4 +18,4 @@ "scripts": {

"devDependencies": {
"@assemblyscript/loader": "^0.17.2",
"assemblyscript": "^0.17.2"
"@assemblyscript/loader": "^0.17.7",
"assemblyscript": "^0.17.7"
},

@@ -22,0 +22,0 @@ "homepage": "https://github.com/samchon/astl",

@@ -30,14 +30,14 @@ # AssemblyScript Standard Template Library

- `ForwardList`
- ~~`VectorBoolean`~~
- `VectorBoolean`
- **Associative Containers**
- *Tree-structured ontainers*
- `TreeSet`
- `TreeMultiSet`
- `TreeMap`
- `TreeMultiMap`
- `TreeMultiSet`
- `TreeSet`
- *Hash-buckets based containers*
- `HashSet`
- `HashMultiSet`
- `HashMap`
- `HashMultiMap`
- `HashMultiSet`
- `HashSet`
- **Adaptor Containers**

@@ -49,6 +49,8 @@ - *Linear adaptors*

- *Associative adaptors*
- `experimental.FlatSet`
- `experimental.FlatMultiSet`
- `experimental.FlatMap`
- `experimental.FlatMultiMap`
- `experimental.FlatMultiSet`
- `experimental.FlatSet`
- `experimental.LightMap`
- `experimental.LightSet`

@@ -55,0 +57,0 @@ ### Algorithms

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