choco.kernel.memory.trailing.trail
Class StoredBinaryTreeTrail

java.lang.Object
  extended by choco.kernel.memory.trailing.trail.StoredBinaryTreeTrail
All Implemented Interfaces:
ITrailStorage

public class StoredBinaryTreeTrail
extends Object
implements ITrailStorage

Created by IntelliJ IDEA. User: julien Date: Apr 24, 2008 Time: 4:47:45 PM


Field Summary
 
Fields inherited from interface choco.kernel.memory.trailing.trail.ITrailStorage
LOGGER
 
Constructor Summary
StoredBinaryTreeTrail(int maxHist, int maxWorld)
           
 
Method Summary
 void clear()
           
 int getSize()
          Retrieving the size of the trail (number of saved past values).
 void resizeWorldCapacity(int newWorldCapacity)
          increase the capacity of the environment to a given number of worlds
 void stack(IStateBinaryTree b, IStateBinaryTree.Node n, int operation)
           
 void worldCommit(int wi)
          Comitting the current world: merging it with the previous one.
 void worldPop(int wi)
          Moving down to the previous world.
 void worldPush(int wi)
          Moving up to the next world.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoredBinaryTreeTrail

public StoredBinaryTreeTrail(int maxHist,
                             int maxWorld)
Method Detail

clear

public void clear()
Specified by:
clear in interface ITrailStorage

stack

public void stack(IStateBinaryTree b,
                  IStateBinaryTree.Node n,
                  int operation)

worldPush

public void worldPush(int wi)
Description copied from interface: ITrailStorage
Moving up to the next world.

Cette methode doit garder l'etat de la variable avant la modification de sorte a la remettre en etat le cas echeant.

Specified by:
worldPush in interface ITrailStorage

worldPop

public void worldPop(int wi)
Description copied from interface: ITrailStorage
Moving down to the previous world.

Cette methode reattribute a la variable ou l'element d'un tableau sa valeur precedente.

Specified by:
worldPop in interface ITrailStorage

worldCommit

public void worldCommit(int wi)
Description copied from interface: ITrailStorage
Comitting the current world: merging it with the previous one.

Not used yet.

Specified by:
worldCommit in interface ITrailStorage

getSize

public int getSize()
Description copied from interface: ITrailStorage
Retrieving the size of the trail (number of saved past values).

Specified by:
getSize in interface ITrailStorage

resizeWorldCapacity

public void resizeWorldCapacity(int newWorldCapacity)
Description copied from interface: ITrailStorage
increase the capacity of the environment to a given number of worlds

Specified by:
resizeWorldCapacity in interface ITrailStorage


Copyright © 2012. All Rights Reserved.