Skip to content

Commit

Permalink
docs: Disambiguous complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
Flast committed Jun 6, 2024
1 parent da21e55 commit 6b9aa25
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions docs/flat_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Construct container from `[first, last)`.

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

```cpp
flat_map(flat_map const& other);
Expand Down Expand Up @@ -122,7 +122,7 @@ Construct from init.
**Complexity**
`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.
```cpp
Expand All @@ -136,7 +136,7 @@ explicit flat_map(range_order order, Container&& cont, allocator_type const& all

**Complexity**

For non sorted range, amortized `O(E logE)` if enough additional memory is available, otherwise amortized `O(E log E^2)`.
For non sorted range, amortized `O(E log(E))` if enough additional memory is available, otherwise amortized `O(E log^2(E))`.
For sorted, and uniqued range `O(1)`, otherwise `O(E)`.

```cpp
Expand Down Expand Up @@ -173,7 +173,7 @@ flat_map& operator=(std::initializer_list<value_type> ilist);

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

## Element access

Expand Down Expand Up @@ -434,7 +434,7 @@ If the `order` is `range_order::sorted` or `range_order::unique_sorted`, the ran
**Complexity**
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E)^2)`.
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log^2(N+E))`.
For sorted range, amortized `O(N+E)` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E))`.
**Invalidation**
Expand Down
12 changes: 6 additions & 6 deletions docs/flat_multimap.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Construct container from `[first, last)`.

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

```cpp
flat_multimap(flat_multimap const& other);
Expand Down Expand Up @@ -116,7 +116,7 @@ Construct from init.
**Complexity**
`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.
```cpp
explicit flat_multimap(range_order order, Container const& cont);
Expand All @@ -129,7 +129,7 @@ explicit flat_multimap(range_order order, Container&& cont, allocator_type const

**Complexity**

For non sorted range, amortized `O(E logE)` if enough additional memory is available, otherwise amortized `O(E log E^2)`.
For non sorted range, amortized `O(E log(E))` if enough additional memory is available, otherwise amortized `O(E log^2(E))`.
For sorted range `O(1)`.

```cpp
Expand Down Expand Up @@ -166,7 +166,7 @@ flat_multimap& operator=(std::initializer_list<value_type> ilist);

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

## Iterators

Expand Down Expand Up @@ -399,7 +399,7 @@ If the `order` is `range_order::sorted` or `range_order::unique_sorted`, the ran
**Complexity**
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E)^2)`.
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log^2(N+E))`.
For sorted range, amortized `O(N+E)` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E))`.
**Invalidation**
Expand Down Expand Up @@ -517,7 +517,7 @@ Merge `source` container into self.
**Complexity**
<!-- Amortized `O(M E)` for insertion. `O(N+E)` for searching insertion point if `source` ordered in same order, otherwise `O(E log(N))`. -->
Amortized `O((N+E) log(N+E)^2)`.
Amortized `O((N+E) log^2(N+E))`.
## Lookup
Expand Down
12 changes: 6 additions & 6 deletions docs/flat_multiset.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Construct container from `[first, last)`.

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

```cpp
flat_multiset(flat_multiset const& other);
Expand Down Expand Up @@ -98,7 +98,7 @@ Construct from init.
**Complexity**
`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.
```cpp
explicit flat_multiset(range_order order, Container const& cont);
Expand All @@ -111,7 +111,7 @@ explicit flat_multiset(range_order order, Container&& cont, allocator_type const

**Complexity**

For non sorted range, amortized `O(E logE)` if enough additional memory is available, otherwise amortized `O(E log E^2)`.
For non sorted range, amortized `O(E log(E))` if enough additional memory is available, otherwise amortized `O(E log^2(E))`.
For sorted range `O(1)`.

```cpp
Expand Down Expand Up @@ -148,7 +148,7 @@ flat_multiset& operator=(std::initializer_list<value_type> ilist);

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

## Iterators

Expand Down Expand Up @@ -381,7 +381,7 @@ If the `order` is `range_order::sorted` or `range_order::unique_sorted`, the ran
**Complexity**
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E)^2)`.
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log^2(N+E))`.
For sorted range, amortized `O(N+E)` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E))`.
**Invalidation**
Expand Down Expand Up @@ -499,7 +499,7 @@ Merge `source` container into self.
**Complexity**
<!-- Amortized `O(M E)` for insertion. `O(N+E)` for searching insertion point if `source` ordered in same order, otherwise `O(E log(N))`. -->
Amortized `O((N+E) log(N+E)^2)`.
Amortized `O((N+E) log^2(N+E))`.
## Lookup
Expand Down
10 changes: 5 additions & 5 deletions docs/flat_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Construct container from `[first, last)`.

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

```cpp
flat_set(flat_set const& other);
Expand Down Expand Up @@ -98,7 +98,7 @@ Construct from init.
**Complexity**
`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.
```cpp
explicit flat_set(range_order order, Container const& cont);
Expand All @@ -111,7 +111,7 @@ explicit flat_set(range_order order, Container&& cont, allocator_type const& all

**Complexity**

For non sorted range, amortized `O(E logE)` if enough additional memory is available, otherwise amortized `O(E log E^2)`.
For non sorted range, amortized `O(E log(E))` if enough additional memory is available, otherwise amortized `O(E log^2(E))`.
For sorted, and uniqued range `O(1)`, otherwise `O(E)`.

```cpp
Expand Down Expand Up @@ -148,7 +148,7 @@ flat_set& operator=(std::initializer_list<value_type> ilist);

**Complexity**

`O(E log(E))` if enough additional memory is available, otherwise `O(E log(E)^2)`.
`O(E log(E))` if enough additional memory is available, otherwise `O(E log^2(E))`.

## Iterators

Expand Down Expand Up @@ -381,7 +381,7 @@ If the `order` is `range_order::sorted` or `range_order::unique_sorted`, the ran
**Complexity**
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E)^2)`.
For non sorted range, amortized `O((N+E) log(N+E))` if enough additional memory is available, otherwise amortized `O((N+E) log^2(N+E))`.
For sorted range, amortized `O(N+E)` if enough additional memory is available, otherwise amortized `O((N+E) log(N+E))`.
**Invalidation**
Expand Down

0 comments on commit 6b9aa25

Please sign in to comment.