File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ module Data.R2Tree.Double
81
81
-- * Construct
82
82
, empty
83
83
, singleton
84
+ , doubleton
85
+ , tripleton
86
+ , quadrupleton
84
87
85
88
-- ** Bulk-loading
86
89
, bulkSTR
@@ -163,3 +166,18 @@ empty = Empty
163
166
-- Tree with a single entry.
164
167
singleton :: MBR -> a -> R2Tree a
165
168
singleton = Leaf1
169
+
170
+ -- | \(\mathcal{O}(1)\).
171
+ -- Tree with two entries.
172
+ doubleton :: MBR -> a -> MBR -> a -> R2Tree a
173
+ doubleton = Leaf2
174
+
175
+ -- | \(\mathcal{O}(1)\).
176
+ -- Tree with three entries.
177
+ tripleton :: MBR -> a -> MBR -> a -> MBR -> a -> R2Tree a
178
+ tripleton = Leaf3
179
+
180
+ -- | \(\mathcal{O}(1)\).
181
+ -- Tree with four entries.
182
+ quadrupleton :: MBR -> a -> MBR -> a -> MBR -> a -> MBR -> a -> R2Tree a
183
+ quadrupleton = Leaf4
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ module Data.R2Tree.Float
21
21
-- * Construct
22
22
, empty
23
23
, singleton
24
+ , doubleton
25
+ , tripleton
26
+ , quadrupleton
24
27
25
28
-- ** Bulk-loading
26
29
, bulkSTR
@@ -103,3 +106,18 @@ empty = Empty
103
106
-- Tree with a single entry.
104
107
singleton :: MBR -> a -> R2Tree a
105
108
singleton = Leaf1
109
+
110
+ -- | \(\mathcal{O}(1)\).
111
+ -- Tree with two entries.
112
+ doubleton :: MBR -> a -> MBR -> a -> R2Tree a
113
+ doubleton = Leaf2
114
+
115
+ -- | \(\mathcal{O}(1)\).
116
+ -- Tree with three entries.
117
+ tripleton :: MBR -> a -> MBR -> a -> MBR -> a -> R2Tree a
118
+ tripleton = Leaf3
119
+
120
+ -- | \(\mathcal{O}(1)\).
121
+ -- Tree with four entries.
122
+ quadrupleton :: MBR -> a -> MBR -> a -> MBR -> a -> MBR -> a -> R2Tree a
123
+ quadrupleton = Leaf4
You can’t perform that action at this time.
0 commit comments