competitive/data_structure/
mod.rs1use crate::algebra::{
4 AbelianGroup, AbelianMonoid, Associative, Group, Magma, MaxOperation, MinOperation, Monoid,
5 MonoidAction, SemiGroup, Unital,
6};
7use crate::algorithm::SliceBisectExt;
8use crate::num::{Bounded, RangeBoundsExt};
9use crate::tools::GetDistinctMut;
10
11#[codesnip::entry("Accumulate")]
12pub use self::accumulate::{Accumulate, Accumulate2d, AccumulateKd};
13#[codesnip::entry("Allocator")]
14pub use self::allocator::{Allocator, MemoryPool};
15#[codesnip::entry("BinaryIndexedTree")]
16pub use self::binary_indexed_tree::BinaryIndexedTree;
17#[codesnip::entry("BinaryIndexedTree2D")]
18pub use self::binary_indexed_tree_2d::BinaryIndexedTree2D;
19#[codesnip::entry("BitVector")]
20pub use self::bit_vector::{BitVector, RankSelectDictionaries};
21#[codesnip::entry("BitSet")]
22pub use self::bitset::BitSet;
23#[codesnip::entry("BTreeMapExt")]
24pub use self::btreemap_ext::{BTreeMapExt, BTreeSetExt};
25#[codesnip::entry("compress")]
26pub use self::compress::{Compressor, HashCompress, VecCompress};
27#[codesnip::entry("CompressedBinaryIndexedTree")]
28pub use self::compressed_binary_indexed_tree::{
29 CompressedBinaryIndexedTree, CompressedBinaryIndexedTree1d, CompressedBinaryIndexedTree2d,
30 CompressedBinaryIndexedTree3d, CompressedBinaryIndexedTree4d,
31};
32#[codesnip::entry("CompressedSegmentTree")]
33pub use self::compressed_segment_tree::{
34 CompressedSegmentTree, CompressedSegmentTree1d, CompressedSegmentTree2d,
35 CompressedSegmentTree3d, CompressedSegmentTree4d,
36};
37#[codesnip::entry("container")]
38pub use self::container::{
39 BTreeMapFactory, Container, ContainerEntry, ContainerFactory, HashMapFactory,
40 HashMapFactoryWithCapacity,
41};
42#[codesnip::entry("Counter")]
43pub use self::counter::{BTreeCounter, HashCounter};
44#[codesnip::entry("DisjointSparseTable")]
45pub use self::disjoint_sparse_table::DisjointSparseTable;
46#[codesnip::entry("FibonacciHash")]
47pub use self::fibonacci_hash::{FibHashMap, FibHashSet};
48#[codesnip::entry("Static2DTree")]
49pub use self::kdtree::Static2DTree;
50#[codesnip::entry("LazySegmentTree")]
51pub use self::lazy_segment_tree::LazySegmentTree;
52#[codesnip::entry("LazySegmentTreeMap")]
53pub use self::lazy_segment_tree_map::LazySegmentTreeMap;
54#[codesnip::entry("LineSet")]
55pub use self::line_set::LineSet;
56#[codesnip::entry("PartiallyRetroactivePriorityQueue")]
57pub use self::partially_retroactive_priority_queue::PartiallyRetroactivePriorityQueue;
58#[codesnip::entry("RangeArithmeticProgressionAdd")]
59pub use self::range_ap_add::RangeArithmeticProgressionAdd;
60#[codesnip::entry("RangeMap")]
61pub use self::range_map::{RangeMap, RangeSet};
62#[codesnip::entry("SegmentTree")]
63pub use self::segment_tree::SegmentTree;
64#[codesnip::entry("SegmentTreeMap")]
65pub use self::segment_tree_map::SegmentTreeMap;
66#[codesnip::entry("sliding_winsow_aggregation")]
67pub use self::sliding_winsow_aggregation::{DequeAggregation, QueueAggregation};
68#[codesnip::entry("slope_trick")]
69pub use self::slope_trick::SlopeTrick;
70#[codesnip::entry("SparseSet")]
71pub use self::sparse_set::SparseSet;
72#[codesnip::entry("SplayTree")]
73pub use self::splay_tree::{SplayMap, SplaySequence};
74#[codesnip::entry("transducer")]
75pub use self::transducer::*;
76#[codesnip::entry("Trie")]
77pub use self::trie::Trie;
78#[codesnip::entry("UnionFind")]
79pub use self::union_find::{
80 MergingUnionFind, PotentializedUnionFind, UndoableUnionFind, UnionFind, UnionFindBase,
81};
82#[codesnip::entry("VecMap")]
83pub use self::vec_map::{FixedVecMapFactory, VecMap, VecMapFactory, VecMapFactoryWithCapacity};
84#[codesnip::entry("WaveletMatrix")]
85pub use self::wavelet_matrix::WaveletMatrix;
86
87#[cfg_attr(
88 nightly,
89 codesnip::entry("Accumulate", include("algebra", "discrete_steps"))
90)]
91mod accumulate;
92#[cfg_attr(nightly, codesnip::entry("Allocator"))]
93mod allocator;
94#[cfg_attr(nightly, codesnip::entry("BinaryIndexedTree", include("algebra")))]
95mod binary_indexed_tree;
96#[cfg_attr(nightly, codesnip::entry("BinaryIndexedTree2D", include("algebra")))]
97mod binary_indexed_tree_2d;
98#[cfg_attr(nightly, codesnip::entry("BitVector"))]
99mod bit_vector;
100#[cfg_attr(nightly, codesnip::entry("BitSet"))]
101mod bitset;
102#[cfg_attr(nightly, codesnip::entry("BTreeMapExt"))]
103mod btreemap_ext;
104#[cfg_attr(nightly, codesnip::entry("compress", include("binary_search")))]
105mod compress;
106#[cfg_attr(
107 nightly,
108 codesnip::entry(
109 "CompressedBinaryIndexedTree",
110 include("algebra", "binary_search", "GetDistinctMut")
111 )
112)]
113mod compressed_binary_indexed_tree;
114#[cfg_attr(
115 nightly,
116 codesnip::entry(
117 "CompressedSegmentTree",
118 include("algebra", "binary_search", "GetDistinctMut")
119 )
120)]
121mod compressed_segment_tree;
122#[cfg_attr(nightly, codesnip::entry("container"))]
123mod container;
124#[cfg_attr(nightly, codesnip::entry("Counter"))]
125mod counter;
126#[cfg_attr(nightly, codesnip::entry("DisjointSparseTable", include("algebra")))]
127mod disjoint_sparse_table;
128#[cfg_attr(nightly, codesnip::entry("FibonacciHash"))]
129mod fibonacci_hash;
130#[cfg_attr(nightly, codesnip::entry("Static2DTree"))]
131mod kdtree;
132#[cfg_attr(
133 nightly,
134 codesnip::entry("LazySegmentTree", include("MonoidAction", "discrete_steps"))
135)]
136mod lazy_segment_tree;
137#[cfg_attr(
138 nightly,
139 codesnip::entry("LazySegmentTreeMap", include("MonoidAction", "discrete_steps"))
140)]
141mod lazy_segment_tree_map;
142#[cfg_attr(nightly, codesnip::entry("LineSet", include("bounded")))]
143mod line_set;
144#[cfg_attr(
145 nightly,
146 codesnip::entry(
147 "PartiallyRetroactivePriorityQueue",
148 include("bounded", "SegmentTree", "MaxOperation", "MinOperation")
149 )
150)]
151pub mod partially_retroactive_priority_queue;
152#[cfg_attr(nightly, codesnip::entry("RangeArithmeticProgressionAdd"))]
153mod range_ap_add;
154#[cfg_attr(nightly, codesnip::entry("RangeMap"))]
155mod range_map;
156#[cfg_attr(
157 nightly,
158 codesnip::entry("SegmentTree", include("algebra", "discrete_steps"))
159)]
160mod segment_tree;
161#[cfg_attr(
162 nightly,
163 codesnip::entry("SegmentTreeMap", include("algebra", "discrete_steps"))
164)]
165mod segment_tree_map;
166#[cfg_attr(
167 nightly,
168 codesnip::entry("sliding_winsow_aggregation", include("algebra"))
169)]
170mod sliding_winsow_aggregation;
171#[cfg_attr(nightly, codesnip::entry("slope_trick"))]
172mod slope_trick;
173#[cfg_attr(nightly, codesnip::entry("SparseSet"))]
174mod sparse_set;
175#[cfg_attr(
176 nightly,
177 codesnip::entry("SplayTree", include("Allocator", "MonoidAction"))
178)]
179pub mod splay_tree;
180#[cfg_attr(
181 nightly,
182 codesnip::entry("transducer", include("algebra", "container", "VecMap"))
183)]
184mod transducer;
185#[cfg_attr(nightly, codesnip::entry("Trie", include("algebra")))]
186mod trie;
187#[cfg_attr(
188 nightly,
189 codesnip::entry("UnionFind", include("algebra", "TupleOperation"))
190)]
191pub mod union_find;
192#[cfg_attr(nightly, codesnip::entry("VecMap", include("container")))]
193mod vec_map;
194#[cfg_attr(nightly, codesnip::entry("WaveletMatrix", include("BitVector")))]
195mod wavelet_matrix;