Loading...
Searching...
No Matches
piercedVector.tpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25#ifndef __BITPIT_PIERCED_VECTOR_TPP__
26#define __BITPIT_PIERCED_VECTOR_TPP__
27
28namespace bitpit {
29
36template<typename value_t, typename id_t>
38 : PiercedVectorKernel<id_t>(),
39 PiercedVectorStorage<value_t, id_t>(1, this, PiercedVectorKernel<id_t>::SYNC_MODE_DISABLED)
40{
41}
42
52template<typename value_t, typename id_t>
54 : PiercedVectorKernel<id_t>(n),
55 PiercedVectorStorage<value_t, id_t>(1, this, PiercedVectorKernel<id_t>::SYNC_MODE_DISABLED)
56{
57}
58
65template<typename value_t, typename id_t>
67 : PiercedVectorKernel<id_t>(other),
68 PiercedVectorStorage<value_t, id_t>(other, this, other.getSyncMode())
69{
70 // Since we have copied the kernel, the list of registered slaves contains
71 // also the internal storage of other vector. We need to unregister that
72 // storage from the kernel.
73 this->unregisterSlave(&other);
74}
75
82template<typename value_t, typename id_t>
84 : PiercedVectorKernel<id_t>(std::move(other)),
85 PiercedVectorStorage<value_t, id_t>(std::move(other), this, other.getSyncMode())
86{
87 // Since we have moved the kernel, the list of registered slaves contains
88 // also the internal storage of other vector. We need to unregister that
89 // storage from the kernel.
90 this->unregisterSlave(&other);
91}
92
99template<typename value_t, typename id_t>
101{
102 PiercedVector<value_t, id_t> temporary(other);
103 this->swap(temporary);
104
105 return *this;
106}
107
114template<typename value_t, typename id_t>
116{
117 this->swap(other);
118
119 return *this;
120}
121
132template<typename value_t, typename id_t>
134{
135 // Fill a position
137
138 // Reclaim the element associated to the position
139 return reclaimValue(reclaimAction);
158template<typename value_t, typename id_t>
160{
161 // Fill a position
162 FillAction reclaimAction = PiercedVectorKernel<id_t>::fillAfter(referenceId, id);
163
164 // Reclaim the element associated to the position
165 return reclaimValue(reclaimAction);
167
179template<typename value_t, typename id_t>
181{
182 // Fill a position
183 FillAction reclaimAction = PiercedVectorKernel<id_t>::fillAppend(id);
185 // Reclaim the element associated to the position
186 return reclaimValue(reclaimAction);
188
205template<typename value_t, typename id_t>
207{
208 // Fill a position
209 FillAction reclaimAction = PiercedVectorKernel<id_t>::fillBefore(referenceId, id);
210
211 // Reclaim the element associated to the position
212 return reclaimValue(reclaimAction);
213}
214
226template<typename value_t, typename id_t>
227typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::moveBefore(const id_t &referenceId, id_t id, bool delayed)
228{
229 // Update the position of the element in the kernel
230 MoveAction moveAction = PiercedVectorKernel<id_t>::moveBefore(referenceId, id, !delayed);
232 // Move the element to the new position
233 return moveValue(moveAction);
235
247template<typename value_t, typename id_t>
248typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::moveAfter(const id_t &referenceId, id_t id, bool delayed)
249{
250 // Update the position of the element in the kernel
251 MoveAction moveAction = PiercedVectorKernel<id_t>::moveAfter(referenceId, id, !delayed);
252
253 // Move the element to the new position
254 return moveValue(moveAction);
255}
256
265template<typename value_t, typename id_t>
267{
268 // Fill a position
270
271 // Insert the new value
272 return insertValue(insertAction, value);
273}
274
287template<typename value_t, typename id_t>
288typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::insertAfter(const id_t &referenceId, id_t id, const value_t &value)
289{
290 // Fill a position
291 FillAction insertAction = PiercedVectorKernel<id_t>::fillAfter(referenceId, id);
292
293 // Insert the new value
294 return insertValue(insertAction, value);
295}
296
309template<typename value_t, typename id_t>
310typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::insertBefore(const id_t &referenceId, id_t id, const value_t &value)
311{
312 // Fill a position
313 FillAction insertAction = PiercedVectorKernel<id_t>::fillBefore(referenceId, id);
314
315 // Insert the new value
316 return insertValue(insertAction, value);
317}
318
326template<typename value_t, typename id_t>
328{
329 // Position
330 std::size_t pos = PiercedVectorKernel<id_t>::getPos(id);
331
332 // Replace the value
333 PiercedVectorStorage<value_t, id_t>::rawSet(pos, std::move(value));
334
335 // Return the iterator that points to the element
337}
338
348template<typename value_t, typename id_t>
350{
351 // Fill a position
353
354 // Insert the new value
355 return insertValue(insertAction, value);
356}
357
372template<typename value_t, typename id_t>
373template<typename... Args, typename PiercedStorage<value_t, id_t>::template EnableIfHasInitialize<Args...> * >
375{
376 // Fill a position
378
379 // Create the new value in-place
380 return emreclaimValue<Args...>(emplaceAction, std::forward<Args>(args)...);
381}
382
400template<typename value_t, typename id_t>
401template<typename... Args, typename PiercedStorage<value_t, id_t>::template EnableIfHasInitialize<Args...> * >
402typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emreclaimAfter(const id_t &referenceId, id_t id, Args&&... args)
403{
404 // Fill a position
405 FillAction emplaceAction = PiercedVectorKernel<id_t>::fillAfter(referenceId, id);
406
407 // Create the new value in-place
408 return emreclaimValue(emplaceAction, std::forward<Args>(args)...);
409}
410
424template<typename value_t, typename id_t>
425template<typename... Args, typename PiercedStorage<value_t, id_t>::template EnableIfHasInitialize<Args...> * >
427{
428 // Fill a position
430
431 // Create the new value in-place
432 emreclaimValue(emplaceAction, std::forward<Args>(args)...);
433}
434
452template<typename value_t, typename id_t>
453template<typename... Args, typename PiercedStorage<value_t, id_t>::template EnableIfHasInitialize<Args...> * >
454typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emreclaimBefore(const id_t &referenceId, id_t id, Args&&... args)
455{
456 // Fill a position
457 FillAction emplaceAction = PiercedVectorKernel<id_t>::fillBefore(referenceId, id);
458
459 // Create the new value in-place
460 return emreclaimValue(emplaceAction, std::forward<Args>(args)...);
461}
462
471template<typename value_t, typename id_t>
472template<typename... Args>
474{
475 // Fill a position
477
478 // Create the new value in-place
479 return emplaceValue(emplaceAction, std::forward<Args>(args)...);
480}
481
493template<typename value_t, typename id_t>
494template<typename... Args>
495typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emplaceAfter(const id_t &referenceId, id_t id, Args&&... args)
496{
497 // Fill a position
498 FillAction emplaceAction = PiercedVectorKernel<id_t>::fillAfter(referenceId, id);
499
500 // Create the new value in-place
501 return emplaceValue(emplaceAction, std::forward<Args>(args)...);
502}
503
512template<typename value_t, typename id_t>
513template<typename... Args>
514void PiercedVector<value_t, id_t>::emplaceBack(id_t id, Args&&... args)
515{
516 // Fill a position
518
519 // Create the new value in-place
520 emplaceValue(emplaceAction, std::forward<Args>(args)...);
521}
522
536template<typename value_t, typename id_t>
537template<typename... Args>
538typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emplaceBefore(const id_t &referenceId, id_t id, Args&&... args)
539{
540 // Fill a position
541 FillAction emplaceAction = PiercedVectorKernel<id_t>::fillBefore(referenceId, id);
542
543 // Create the new value in-place
544 return emplaceValue(emplaceAction, std::forward<Args>(args)...);
545}
546
556template<typename value_t, typename id_t>
557template<typename... Args>
559{
560 // Position
561 std::size_t pos = PiercedVectorKernel<id_t>::getPos(id);
562
563 // Replace the value
564 PiercedVectorStorage<value_t, id_t>::rawEmreplace(pos, std::forward<Args>(args)...);
565
566 // Return the iterator that points to the element
568}
569
585template<typename value_t, typename id_t>
587{
588 // Erase the position
589 EraseAction eraseAction = PiercedVectorKernel<id_t>::erase(id, !delayed);
590
591 // Erase the value
592 return eraseValue(eraseAction);
593}
594
603template<typename value_t, typename id_t>
605{
606 // Erase the position
608
609 // Erase the value
610 eraseValue(eraseAction);
611}
612
619template<typename value_t, typename id_t>
620void PiercedVector<value_t, id_t>::swap(id_t id_first, id_t id_second)
621{
622 // Update the kernel
623 SwapAction swapAction = PiercedVectorKernel<id_t>::swap(id_first, id_second);
624
625 // Update the storage
626 swapValues(swapAction);
627}
628
637template<typename value_t, typename id_t>
639{
640 // Update the kernel
641 ClearAction clearAction = PiercedVectorKernel<id_t>::clear(release);
642
643 // Update the storage
645}
646
659template<typename value_t, typename id_t>
661{
662 // Update the kernel
664
665 // Update the storage
667}
668
686template<typename value_t, typename id_t>
688{
689 // Update the kernel
691
692 // Update the storage
694}
695
699template<typename value_t, typename id_t>
701{
702 // Update the kernel
704
705 // Update the storage
707}
708
718template<typename value_t, typename id_t>
719void PiercedVector<value_t, id_t>::sortAfter(id_t referenceId, bool inclusive)
720{
721 // Update the kernel
722 SortAction sortAction = PiercedVectorKernel<id_t>::sortAfter(referenceId, inclusive);
723
724 // Update the storage
726}
727
737template<typename value_t, typename id_t>
738void PiercedVector<value_t, id_t>::sortBefore(id_t referenceId, bool inclusive)
739{
740 // Update the kernel
741 SortAction sortAction = PiercedVectorKernel<id_t>::sortBefore(referenceId, inclusive);
742
743 // Update the storage
745}
746
757template<typename value_t, typename id_t>
759{
760 // Update the kernel
762
763 // Update the storage
765}
766
777template<typename value_t, typename id_t>
779{
780 // Update the kernel
782
783 // Update the storage
785}
786
800template<typename value_t, typename id_t>
802{
803 // The swap will swap also the slave-master information. This is not what
804 // we want, therefore the two pierced storage will be unregistered and the
805 // registered again after the swap. When the kernel is unset the storage
806 // can't be clear, otherwise its contents will be lost.
808 other.PiercedVectorStorage<value_t, id_t>::detachKernel();
809
810 // Swap kernel data
812
813 // Swap storage data
815
816 // Re-register the storages
817 //
818 // The function that sets a dynamic kernel may throw an exception if the
819 // kernel is already set or if we are trying to set a null kernel. Here
820 // neither of the two cases can happen, because the kernel has been
821 // previously cleared and the kernel we are trying to set is not null.
822 try {
824 other.PiercedVectorStorage<value_t, id_t>::setDynamicKernel(&other, PiercedVectorKernel<id_t>::SYNC_MODE_DISABLED);
825 } catch (const std::exception &exception) {
826 BITPIT_UNUSED(exception);
827 assert(false && "Error while swapping the PiercedVector!");
828 std::cout << "Error while swapping the PiercedVector!" << std::endl;
829 exit(0);
830 }
831}
832
838template<typename value_t, typename id_t>
840{
841 return *this;
842}
843
849template<typename value_t, typename id_t>
854
858template<typename value_t, typename id_t>
863
869template<typename value_t, typename id_t>
870template<typename T, typename std::enable_if<std::is_pod<T>::value || PiercedVectorStorage<T, id_t>::has_restore()>::type *>
872{
873 restoreKernel(stream);
874
876}
877
883template<typename value_t, typename id_t>
884template<typename T, typename std::enable_if<std::is_pod<T>::value || PiercedVectorStorage<T, id_t>::has_dump()>::type *>
885void PiercedVector<value_t, id_t>::dump(std::ostream &stream) const
886{
887 dumpKernel(stream);
888
890}
891
897template<typename value_t, typename id_t>
904
910template<typename value_t, typename id_t>
911void PiercedVector<value_t, id_t>::dumpKernel(std::ostream &stream) const
912{
914}
915
921template<typename value_t, typename id_t>
923{
924 std::size_t pos = action.info[PiercedSyncAction::INFO_POS];
925 switch (static_cast<typename FillAction::FillActionType>(action.type)) {
926
927 case FillAction::TYPE_OVERWRITE:
928 {
929 // Nothing to do
930 break;
931 }
932
933 case FillAction::TYPE_INSERT:
934 {
935 // Since we are increasing the sotrage by an element at the time
936 // calling a reserve will hurt performance badly because this will
937 // prevent the automatic reallocation of the storage.
939 break;
940 }
941
942 case FillAction::TYPE_APPEND:
943 {
944 // Since we are increasing the sotrage by an element at the time
945 // calling a reserve will hurt performance badly because this will
946 // prevent the automatic reallocation of the storage.
949 break;
950 }
951
952 default:
953 {
954 BITPIT_UNREACHABLE("This action is not handled");
955 break;
956 }
957
958 }
959
960 // Return the iterator to the position where the element was inserted
962}
963
970template<typename value_t, typename id_t>
971typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::insertValue(const FillAction &action, const value_t &value)
972{
973 std::size_t pos = action.info[PiercedSyncAction::INFO_POS];
974 switch (static_cast<typename FillAction::FillActionType>(action.type)) {
975
976 case FillAction::TYPE_OVERWRITE:
977 {
979 break;
980 }
981
982 case FillAction::TYPE_INSERT:
983 {
984 // Since we are increasing the sotrage by an element at the time
985 // calling a reserve will hurt performance badly because this will
986 // prevent the automatic reallocation of the storage.
988 break;
989 }
990
991 case FillAction::TYPE_APPEND:
992 {
993 // Since we are increasing the sotrage by an element at the time
994 // calling a reserve will hurt performance badly because this will
995 // prevent the automatic reallocation of the storage.
998 break;
999 }
1000
1001 default:
1002 {
1003 BITPIT_UNREACHABLE("This action is not handled");
1004 break;
1005 }
1006
1007 }
1008
1009 // Return the iterator to the position where the element was inserted
1011}
1012
1023template<typename value_t, typename id_t>
1024template<typename... Args, typename PiercedStorage<value_t, id_t>::template EnableIfHasInitialize<Args...> * >
1025typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emreclaimValue(const FillAction &action, Args&&... args)
1026{
1027 std::size_t pos = action.info[PiercedSyncAction::INFO_POS];
1028 switch (static_cast<typename FillAction::FillActionType>(action.type)) {
1029
1030 case FillAction::TYPE_OVERWRITE:
1031 {
1032 PiercedVectorStorage<value_t, id_t>::rawInitialize(pos, std::forward<Args>(args)...);
1033 break;
1034 }
1035
1036 case FillAction::TYPE_INSERT:
1037 {
1038 // Since we are increasing the sotrage by an element at the time
1039 // calling a reserve will hurt performance badly because this will
1040 // prevent the automatic reallocation of the storage.
1041 PiercedVectorStorage<value_t, id_t>::rawEmplace(pos, std::forward<Args>(args)...);
1042 break;
1043 }
1044
1045 case FillAction::TYPE_APPEND:
1046 {
1047 // Since we are increasing the sotrage by an element at the time
1048 // calling a reserve will hurt performance badly because this will
1049 // prevent the automatic reallocation of the storage.
1050 PiercedVectorStorage<value_t, id_t>::rawEmplaceBack(std::forward<Args>(args)...);
1052 break;
1053 }
1054
1055 default:
1056 {
1057 BITPIT_UNREACHABLE("This action is not handled");
1058 break;
1059 }
1060
1061 }
1062
1063 // Return the iterator to the position where the element was inserted
1065}
1066
1074template<typename value_t, typename id_t>
1075template<typename... Args>
1076typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::emplaceValue(const FillAction &action, Args&&... args)
1077{
1078 std::size_t pos = action.info[PiercedSyncAction::INFO_POS];
1079 switch (static_cast<typename FillAction::FillActionType>(action.type)) {
1080
1081 case FillAction::TYPE_OVERWRITE:
1082 {
1083 PiercedVectorStorage<value_t, id_t>::rawEmreplace(pos, std::forward<Args>(args)...);
1084 break;
1085 }
1086
1087 case FillAction::TYPE_INSERT:
1088 {
1089 // Since we are increasing the sotrage by an element at the time
1090 // calling a reserve will hurt performance badly because this will
1091 // prevent the automatic reallocation of the storage.
1092 PiercedVectorStorage<value_t, id_t>::rawEmplace(pos, std::forward<Args>(args)...);
1093 break;
1094 }
1095
1096 case FillAction::TYPE_APPEND:
1097 {
1098 // Since we are increasing the sotrage by an element at the time
1099 // calling a reserve will hurt performance badly because this will
1100 // prevent the automatic reallocation of the storage.
1101 PiercedVectorStorage<value_t, id_t>::rawEmplaceBack(std::forward<Args>(args)...);
1103 break;
1104 }
1105
1106 default:
1107 {
1108 BITPIT_UNREACHABLE("This action is not handled");
1109 break;
1110 }
1111
1112 }
1113
1114 // Return the iterator to the position where the element was inserted
1116}
1117
1124template<typename value_t, typename id_t>
1125typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::moveValue(const MoveAction &action)
1126{
1127 std::size_t posNew = action.info[PiercedSyncAction::INFO_POS_FIRST];
1128 std::size_t posOld = action.info[PiercedSyncAction::INFO_POS_SECOND];
1129 switch (static_cast<typename MoveAction::MoveActionType>(action.type)) {
1130
1131 case MoveAction::TYPE_OVERWRITE:
1132 {
1134 break;
1135 }
1136
1137 case MoveAction::TYPE_INSERT:
1138 {
1139 // Since we are increasing the sotrage by an element at the time
1140 // calling a reserve will hurt performance badly because this will
1141 // prevent the automatic reallocation of the storage.
1143 break;
1144 }
1145
1146 case MoveAction::TYPE_APPEND:
1147 {
1148 // Since we are increasing the sotrage by an element at the time
1149 // calling a reserve will hurt performance badly because this will
1150 // prevent the automatic reallocation of the storage.
1153 break;
1154 }
1155
1156 default:
1157 {
1158 BITPIT_UNREACHABLE("This action is not handled");
1159 break;
1160 }
1161
1162 }
1163
1164 // Clear the old position
1166
1167 // Return the iterator to the new position
1169}
1170
1179template<typename value_t, typename id_t>
1180typename PiercedVector<value_t, id_t>::iterator PiercedVector<value_t, id_t>::eraseValue(const EraseAction &action)
1181{
1182 switch (static_cast<typename EraseAction::EraseActionType>(action.type)) {
1183
1184 case EraseAction::TYPE_PIERCE:
1185 {
1186 // Nothing to do. To improve performance the element will not be
1187 // cleared.
1188 break;
1189 }
1190
1191 case EraseAction::TYPE_SHRINK:
1192 {
1193 std::size_t rawSize = action.info[PiercedSyncAction::INFO_SIZE];
1195 break;
1196 }
1197
1198 default:
1199 {
1200 BITPIT_UNREACHABLE("This action is not handled");
1201 break;
1202 }
1203
1204 }
1205
1206 // Return the iterator to the next element
1207 std::size_t nextPos = action.info[PiercedSyncAction::INFO_POS_NEXT];
1208
1210}
1211
1217template<typename value_t, typename id_t>
1218void PiercedVector<value_t, id_t>::swapValues(const SwapAction &action)
1219{
1220 switch (static_cast<typename SwapAction::SwapActionType>(action.type)) {
1221
1222 case SwapAction::TYPE_SWAP:
1223 {
1224 std::size_t posFirst = action.info[PiercedSyncAction::INFO_POS_FIRST];
1225 std::size_t posSecond = action.info[PiercedSyncAction::INFO_POS_SECOND];
1227 break;
1228 }
1229
1230 default:
1231 {
1232 BITPIT_UNREACHABLE("This action is not handled");
1233 break;
1234 }
1235
1236 }
1237}
1238
1239}
1240
1241#endif
ResizeAction resize(std::size_t n)
std::size_t getPos(id_t id) const
SortAction sortBefore(id_t referenceId, bool inclusive)
EraseAction erase(id_t id, bool flush=false)
FillAction fillAppend(id_t id)
SqueezeAction squeeze()
MoveAction moveAfter(id_t referenceId, id_t id, bool flush=false)
ClearAction clear(bool release=true)
ReserveAction reserve(std::size_t n)
FillAction fillAfter(id_t referenceId, id_t id)
FillAction fillBefore(id_t referenceId, id_t id)
void swap(PiercedKernel &other) noexcept
FillAction fillHead(id_t id)
void restore(std::istream &stream)
SortAction sortAfter(id_t referenceId, bool inclusive)
ShrinkToFitAction shrinkToFit()
std::size_t getLastUsedPos() const
MoveAction moveBefore(id_t referenceId, id_t id, bool flush=false)
Iterator for the class PiercedStorage.
void swap(PiercedStorageSyncSlave< id_t > &other) noexcept
Metafunction for generating a pierced storage.
void restore(std::istream &stream)
void rawInitialize(std::size_t pos, Args &&... args)
void commitSyncAction(const PiercedSyncAction &action) override
void rawSwap(std::size_t pos_first, std::size_t pos_second)
static constexpr bool has_dump()
void rawPushBack(const value_t &value)
iterator rawFind(std::size_t pos) noexcept
void rawEmreplace(std::size_t pos, Args &&... args)
static constexpr bool has_restore()
void rawEmplaceBack(Args &&... args)
void dump(std::ostream &stream) const
void rawEmplace(std::size_t pos, Args &&... args)
void rawInsert(std::size_t pos, std::size_t n, const value_t &value)
void rawSet(std::size_t pos, const value_t &value)
void rawResize(std::size_t n, const value_t &value=value_t())
void unregisterSlave(const PiercedSyncSlave *slave) const
Kernel of the pierced vector.
Kernel of the pierced vector.
__PVS_REFERENCE__ rawAt(std::size_t pos)
void setDynamicKernel(const PiercedVectorKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
Metafunction for generating a pierced vector.
iterator emplaceBefore(const id_t &referenceId, id_t id, Args &&... args)
void restore(std::istream &stream)
iterator insert(id_t id, const value_t &value)
iterator insertBefore(const id_t &referenceId, id_t id, const value_t &value)
iterator emreclaimAfter(const id_t &referenceId, id_t id, Args &&... args)
iterator replace(id_t id, value_t &&value)
iterator emplace(id_t id, Args &&... args)
const PiercedVectorKernel< id_t > & getKernel() const
iterator emreclaimBefore(const id_t &referenceId, id_t id, Args &&... args)
const PiercedVectorStorage< value_t, id_t > & getStorage() const
iterator reclaimBefore(const id_t &referenceId, id_t id)
void clear(bool release=true)
iterator reclaim(id_t id)
iterator emreclaim(id_t id, Args &&... args)
void sortAfter(id_t referenceId, bool inclusive)
iterator pushBack(id_t id, const value_t &value)
iterator erase(id_t id, bool delayed=false)
void swap(id_t id_first, id_t id_second)
PiercedVector< value_t, id_t > & operator=(const PiercedVector< value_t, id_t > &other)
iterator emreplace(id_t id, Args &&... args)
void restoreKernel(std::istream &stream)
iterator reclaimBack(id_t id)
iterator moveAfter(const id_t &referenceId, id_t id, bool delayed=false)
iterator insertAfter(const id_t &referenceId, id_t id, const value_t &value)
void sortBefore(id_t referenceId, bool inclusive)
iterator reclaimAfter(const id_t &referenceId, id_t id)
PiercedVectorStorage< value_t, id_t >::iterator iterator
void emreclaimBack(id_t id, Args &&... args)
void emplaceBack(id_t id, Args &&... args)
void dumpKernel(std::ostream &stream) const
void reserve(std::size_t n)
void resize(std::size_t n)
iterator moveBefore(const id_t &referenceId, id_t id, bool delayed=false)
iterator emplaceAfter(const id_t &referenceId, id_t id, Args &&... args)
#define BITPIT_UNREACHABLE(str)
Definition compiler.hpp:53
#define BITPIT_UNUSED(variable)
Definition compiler.hpp:63
--- layout: doxygen_footer ---