@@ -45,14 +45,14 @@ class CompressedStack: public Stack<T,D>{
4545 Block<T,D> getFirstPartial (int lvl);
4646 Block<T,D> getCompressed ();
4747 ExplicitPointer<T,D> getFirstExplicit ();
48- std::shared_ptr<Data< T,D> > getExplicitData (int k);
48+ SPData< T,D> getExplicitData (int k);
4949
5050 // IO
5151 std::string toString ();
5252
5353 // Push Internals
54- void pushExplicit (std::shared_ptr<Data< T,D> > elt);
55- void pushCompressed (std::shared_ptr<Data< T,D> > elt, int lvl, std::streampos position);
54+ void pushExplicit (SPData< T,D> elt);
55+ void pushCompressed (SPData< T,D> elt, int lvl, std::streampos position);
5656 Data<T,D> top ();
5757 int topIndex ();
5858 void compress ();
@@ -146,7 +146,7 @@ ExplicitPointer<T,D> CompressedStack<T,D>::getFirstExplicit(){
146146}
147147
148148template <class T , class D >
149- std::shared_ptr<Data< T,D> > CompressedStack<T,D>::getExplicitData(int k){
149+ SPData< T,D> CompressedStack<T,D>::getExplicitData(int k){
150150 if (k <= (int ) mFirst .mExplicit .size ()) {
151151 return mFirst .mExplicit [k-1 ];
152152 } else {
@@ -209,7 +209,7 @@ void CompressedStack<T,D>::resetBlock(Signature<T,D> sign, int lvl){
209209template <class T , class D >
210210void CompressedStack<T,D>::push(const Data<T,D> &elt, std::streampos position){
211211 // update the buffer (if buffer size is bigger than 0)
212- std::shared_ptr<Data< T,D> > ptr_elt = std::make_shared<Data<T,D>>(elt);
212+ SPData< T,D> ptr_elt = std::make_shared<Data<T,D>>(elt);
213213 mBuffer .push (ptr_elt);
214214 // update the explicit Blocks, with possibly shifting first to second
215215 pushExplicit (ptr_elt);
@@ -222,9 +222,9 @@ void CompressedStack<T,D>::push(const Data<T,D> &elt, std::streampos position){
222222
223223// Function push for the Explicit members of the stack
224224template <class T , class D >
225- void CompressedStack<T,D>::pushExplicit(std::shared_ptr<Data< T,D> > elt){
225+ void CompressedStack<T,D>::pushExplicit(SPData< T,D> elt){
226226 int index = elt->mIndex ;
227- std::shared_ptr<Data< T,D> > eltPtr = elt;
227+ SPData< T,D> eltPtr = elt;
228228 Signature<T,D> sign (index, mPosition , mContext , mBuffer );
229229
230230 // If the explicit datas of component 1 are empty we push
@@ -259,7 +259,7 @@ void CompressedStack<T,D>::pushExplicit(std::shared_ptr<Data<T,D>> elt){
259259
260260// Function push for the part. and fully compressed members of the stack
261261template <class T , class D >
262- void CompressedStack<T,D>::pushCompressed(std::shared_ptr<Data< T,D> > elt, int lvl, std::streampos position){
262+ void CompressedStack<T,D>::pushCompressed(SPData< T,D> elt, int lvl, std::streampos position){
263263 int distSubBlock = std::pow (mSpace ,(mDepth - lvl));
264264 int distBlock = distSubBlock * mSpace ;
265265 int index = elt->mIndex ;
@@ -437,14 +437,14 @@ void CompressedStack<T,D>::reconstruct(Problem<T,D> &problem, const Signature<T,
437437
438438template <class T , class D >
439439void CompressedStack<T,D>::popBuffer(){
440- std::shared_ptr<Data< T,D> > elt = getExplicitData (mBuffer .mSize );
440+ SPData< T,D> elt = getExplicitData (mBuffer .mSize );
441441 mBuffer .pop (elt);
442442}
443443
444444template <class T , class D >
445445Data<T,D> CompressedStack<T,D>::pop(Problem<T,D> &problem){
446446 popBuffer ();
447- std::shared_ptr<Data< T,D> > elt;
447+ SPData< T,D> elt;
448448 if (mFirst .mExplicit .empty ()) {
449449 if (mSecond .mExplicit .empty ()) {
450450 // Reconstruct the compressed stack with the first available signature
0 commit comments