package @rimbu/core
The @rimbu/core
package is a convenience package that exports most items from the following packages:
@rimbu/bimap
@rimbu/bimultimap
@rimbu/collection-types
@rimbu/common
@rimbu/deep
@rimbu/graph
@rimbu/hashed
@rimbu/list
@rimbu/multimap
@rimbu/multiset
@rimbu/ordered
@rimbu/proximity
@rimbu/sorted
@rimbu/stream
@rimbu/table
Interfaces
Name | Description |
---|---|
ArrowGraph<N> | An type-invariant immutable arrow (directed) graph. See the Graph documentation and the ArrowGraph API documentation |
ArrowGraphHashed<N> | An type-invariant immutable valued arrow (directed) graph. The connections are internally maintained using hashed collections See the Graph documentation and the ArrowGraphHashed API documentation |
ArrowGraphSorted<N> | An type-invariant immutable valued arrow (directed) graph. The connections are internally maintained using sorted collections See the Graph documentation and the ArrowGraphSorted API documentation |
ArrowValuedGraph<N,V> | An type-invariant immutable valued arrow (directed) graph. See the Graph documentation and the ArrowValuedGraph API documentation |
ArrowValuedGraphHashed<N,V> | An type-invariant immutable valued arrow (directed) graph. The nodes are internally maintained using HashMaps See the Graph documentation and the ArrowValuedGraphHashed API documentation |
ArrowValuedGraphSorted<N,V> | An type-invariant immutable valued arrow (directed) graph. The nodes are internally maintained using SortedMaps See the Graph documentation and the ArrowValuedGraphSorted API documentation |
BiMap<K,V> | A type-invariant immutable bi-directional Map where keys and values have a one-to-one mapping. See the BiMap documentation and the BiMap API documentation |
BiMultiMap<K,V> | A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. See the BiMultiMap documentation and the BiMultiMap API documentation |
Comp<K> | An object providing methods to compare two values of type K . |
EdgeGraph<N> | An type-invariant immutable edge (undirected) graph. See the Graph documentation and the EdgeGraph API documentation |
EdgeGraphHashed<N> | An type-invariant immutable valued edge (undirected) graph. The connections are internally maintained using hashed collections See the Graph documentation and the EdgeGraphHashed API documentation |
EdgeGraphSorted<N> | An type-invariant immutable valued edge (undirected) graph. The connections are internally maintained using sorted collections See the Graph documentation and the EdgeGraphSorted API documentation |
EdgeValuedGraph<N,V> | An type-invariant immutable valued edge (undirected) graph. See the Graph documentation and the EdgeValuedGraph API documentation |
EdgeValuedGraphHashed<N,V> | An type-invariant immutable valued edge (undirected) graph. The nodes are internally maintained using HashMaps See the Graph documentation and the EdgeValuedGraphHashed API documentation |
EdgeValuedGraphSorted<N,V> | An type-invariant immutable valued edge (undirected) graph. The nodes are internally maintained using SortedMaps See the Graph documentation and the EdgeValuedGraphSorted API documentation |
GenSource<E> | undocumented |
Graph<N> | An type-invariant immutable graph. See the Graph documentation and the Graph API documentation |
HashBiMultiMap<K,V> | A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. Its keys and values are hashed. See the BiMultiMap documentation and the HashBiMultiMap API documentation |
Hasher<UK> | Interface used to hash objects for hashed collections. |
HashMultiMapHashValue<K,V> | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the HashMultiMapHashValue API documentation |
HashMultiMapSortedValue<K,V> | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the HashMultiMapSortedValue API documentation |
HashMultiSet<T> | A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the HashMultiSet API documentation |
List<T> | A random accessible immutable sequence of values of type T. See the List documentation and the List API documentation |
MultiMap<K,V> | A type-invariant immutable MultiMap of key type K, and value type V. In the Map, each key has at least one value. See the MultiMap documentation and the MultiMap API documentation |
MultiSet<T> | A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the MultiSet API documentation |
SortedBiMultiMap<K,V> | A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. Its keys and values are sorted. See the BiMultiMap documentation and the HashBiMultiMap API documentation |
SortedMultiMapHashValue<K,V> | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the SortedMultiMapHashValue API documentation |
SortedMultiMapSortedValue<K,V> | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the SortedMultiMapSortedValue API documentation |
SortedMultiSet<T> | A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the SortedMultiSet API documentation |
Table<R,C,V> | A type-invariant immutable Table of row key type R, column key type C, and value type V. In the Table, a combination of a row and column key has exactly one value. See the Table documentation and the Table API documentation |
ToJSON<V,D> | Utility type to convert some object to a JSON serializable format. |
TraverseState | An object used to track the state of a traversal, e.g. a forEach . |
ValuedGraph<N,V> | An type-invariant immutable valued graph. See the Graph documentation and the ValuedGraph API documentation |
VariantGraph<N> | An type-variant immutable graph. See the Graph documentation and the VariantGraph API documentation |
VariantMultiMap<K,V> | A type-variant immutable MultiMap of key type K, and value type V. In the Map, each key has at least one value. See the MultiMap documentation and the VariantMultiMap API documentation |
VariantMultiSet<T> | A type-variant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the VariantMultiSet API documentation |
VariantTable<R,C,V> | A type-variant immutable Table of row key type R, column key type C, and value type V. In the Table, a combination of a row and column key has exactly one value. See the Table documentation and the VariantTable API documentation |
VariantValuedGraph<N,V> | An type-variant immutable valued graph. See the Graph documentation and the VariantValuedGraph API documentation |
Namespaces
Name | Description |
---|---|
ArrowGraph | An type-invariant immutable arrow (directed) graph. See the Graph documentation and the ArrowGraph API documentation |
ArrowGraphHashed | An type-invariant immutable valued arrow (directed) graph. The connections are internally maintained using hashed collections See the Graph documentation and the ArrowGraphHashed API documentation |
ArrowGraphSorted | An type-invariant immutable valued arrow (directed) graph. The connections are internally maintained using sorted collections See the Graph documentation and the ArrowGraphSorted API documentation |
ArrowValuedGraph | An type-invariant immutable valued arrow (directed) graph. See the Graph documentation and the ArrowValuedGraph API documentation |
ArrowValuedGraphHashed | An type-invariant immutable valued arrow (directed) graph. The nodes are internally maintained using HashMaps See the Graph documentation and the ArrowValuedGraphHashed API documentation |
ArrowValuedGraphSorted | An type-invariant immutable valued arrow (directed) graph. The nodes are internally maintained using SortedMaps See the Graph documentation and the ArrowValuedGraphSorted API documentation |
AsyncOptLazy | A potentially lazy and/or asynchronous value of type T. |
AsyncReducer | An AsyncReducer is a stand-alone asynchronous calculation that takes input values of type I, and, when requested, produces an output value of type O. |
BiMap | A type-invariant immutable bi-directional Map where keys and values have a one-to-one mapping. See the BiMap documentation and the BiMap API documentation |
BiMultiMap | A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. See the BiMultiMap documentation and the BiMultiMap API documentation |
CollectFun | A function used in collect methods to collect values from a collection. This is basically a single-pass map and filter. |
Comp | An object providing methods to compare two values of type K . |
Deep | undocumented |
EdgeGraph | An type-invariant immutable edge (undirected) graph. See the Graph documentation and the EdgeGraph API documentation |
EdgeGraphHashed | An type-invariant immutable valued edge (undirected) graph. The connections are internally maintained using hashed collections See the Graph documentation and the EdgeGraphHashed API documentation |
EdgeGraphSorted | An type-invariant immutable valued edge (undirected) graph. The connections are internally maintained using sorted collections See the Graph documentation and the EdgeGraphSorted API documentation |
EdgeValuedGraph | An type-invariant immutable valued edge (undirected) graph. See the Graph documentation and the EdgeValuedGraph API documentation |
EdgeValuedGraphHashed | An type-invariant immutable valued edge (undirected) graph. The nodes are internally maintained using HashMaps See the Graph documentation and the EdgeValuedGraphHashed API documentation |
EdgeValuedGraphSorted | An type-invariant immutable valued edge (undirected) graph. The nodes are internally maintained using SortedMaps See the Graph documentation and the EdgeValuedGraphSorted API documentation |
Eq | A function returning true if given v1 and v2 should be considered equal. |
ErrBase | undocumented |
Graph | An type-invariant immutable graph. See the Graph documentation and the Graph API documentation |
HashBiMultiMap | A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. Its keys and values are hashed. See the BiMultiMap documentation and the HashBiMultiMap API documentation |
Hasher | Interface used to hash objects for hashed collections. |
HashMultiMapHashValue | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the HashMultiMapHashValue API documentation |
HashMultiMapSortedValue | A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the HashMultiMapSortedValue API documentation |
HashMultiSet | A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the HashMultiSet API documentation |
IndexRange | A flexible range specification for numeric indices. If a start or end is defined, a tuple can be used where the second item is a boolean indicating whether that end is inclusive or exclusive. |
An IndexRange can have one of the following forms:
- { amount: number }
- { start: number }
- { start: number, amount: number }
- { start: number, end: number }
- { start: number, end: [number, boolean] }
- { start: [number, boolean] }
- { start: [number, boolean], amount: number }
- { start: [number, boolean], end: number }
- { start: [number, boolean], end: [number, boolean] }
- { end: number }
- { end: [number, boolean] }
|
|
List
| A random accessible immutable sequence of values of type T. See the List documentation and the List API documentation | |MultiMap
| A type-invariant immutable MultiMap of key type K, and value type V. In the Map, each key has at least one value. See the MultiMap documentation and the MultiMap API documentation | |MultiSet
| A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the MultiSet API documentation | |Range
| A range definition for any type of (orderable) value. If a start or end is defined, a tuple can be used where the second item is a boolean indicating whether that end is inclusive (true) or exclusive (false). A Range of type T can have one of the following forms: - { end: T }
- { end: [T, boolean] }
- { start: T }
- { start: T, end: T }
- { start: T, end: [T, boolean] }
- { start: [T, boolean] }
- { start: [T, boolean], end: T }
- { start: [T, boolean], end: [T, boolean] }
|
|
Reducer
| AReducer
is a stand-alone calculation that takes input values of type I, and, when requested, produces an output value of type O. | |SortedBiMultiMap
| A type-invariant immutable bi-directional MultiMap where keys and values have a many-to-many mapping. Its keys and values are sorted. See the BiMultiMap documentation and the HashBiMultiMap API documentation | |SortedMultiMapHashValue
| A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the SortedMultiMapHashValue API documentation | |SortedMultiMapSortedValue
| A type-invariant immutable MultiMap of key type K, and value type V. In the MultiMap, each key has at least one value. See the MultiMap documentation and the SortedMultiMapSortedValue API documentation | |SortedMultiSet
| A type-invariant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the SortedMultiSet API documentation | |Table
| A type-invariant immutable Table of row key type R, column key type C, and value type V. In the Table, a combination of a row and column key has exactly one value. See the Table documentation and the Table API documentation | |Traverse
| undocumented | |Tuple
| A readonly array of fixed length and types. | |ValuedGraph
| An type-invariant immutable valued graph. See the Graph documentation and the ValuedGraph API documentation | |VariantGraph
| An type-variant immutable graph. See the Graph documentation and the VariantGraph API documentation | |VariantMultiMap
| A type-variant immutable MultiMap of key type K, and value type V. In the Map, each key has at least one value. See the MultiMap documentation and the VariantMultiMap API documentation | |VariantMultiSet
| A type-variant immutable MultiSet of value type T. In the MultiSet, each value can occur multiple times. See the MultiSet documentation and the VariantMultiSet API documentation | |VariantTable
| A type-variant immutable Table of row key type R, column key type C, and value type V. In the Table, a combination of a row and column key has exactly one value. See the Table documentation and the VariantTable API documentation | |VariantValuedGraph
| An type-variant immutable valued graph. See the Graph documentation and the VariantValuedGraph API documentation |
Classes
Name | Description |
---|---|
BlockBuilderBase | undocumented |
CollisionBuilderBase | undocumented |
Functions
Err
Throws an Err.ForcedError
error when called.
Err
Err.ForcedError
error when called.Definition
export declare function Err(): never;
const emptyMap = HashMap.empty<number, string>()
emptyMap.get(5, Err);
// throws: Err.CustomError(message: 'Err: forced to throw error')
OptLazy
Returns the value contained in an OptLazy
instance of type T.
OptLazy
OptLazy
instance of type T.OptLazyOr
Returns the value contained in an OptLazyOr
instance of type T, or the given otherValue
if the lazy function returns it.
OptLazyOr
OptLazyOr
instance of type T, or the given otherValue
if the lazy function returns it.Definition
export declare function OptLazyOr<T, O>(optLazyOr:
OptLazyOr
<T, O>, otherValue: O): T
|
O;
Type parameters
Name | Description |
---|---|
T | |
O |
Parameters
Name | Type | Description |
---|---|---|
optLazyOr | OptLazyOr <T, O> | a value or a function returning a value or otherwise the received value |
otherValue | O | the value to return if the optLazyOr does not return its own value |
OptLazyOr(1, 'a') // => 1
OptLazyOr(() => 1, 'a') // => 1
OptLazyOr((none) => none, 'a') // => 'a'
TraverseState
Returns a new TraverseState
instance, using optionally given startIndex
as a start index value.
TraverseState
TraverseState
instance, using optionally given startIndex
as a start index value.Definition
export declare function TraverseState(startIndex?: number):
TraverseState
;
Parameters
Name | Type | Description |
---|---|---|
startIndex | number | (default: 0) the start index to use |
Update
Returns the result of given update
parameter, where it can either directly give a new value, or it is a function receiving the given value
, and returns a new value.
Update
update
parameter, where it can either directly give a new value, or it is a function receiving the given value
, and returns a new value.Definition
export declare function Update<T>(value: T, update:
Update
<T>): T;
Type parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
value | T | the current value |
update | Update <T> | an Update value, either a new value or a function receiving the old value and returning a new one. |
Update(1, 2) // => 2
Update(1, () => 10) // => 10
Update(1, v => v + 1) // => 2