Class ArrayEventStore
- java.lang.Object
-
- org.chocosolver.solver.explanations.ArrayEventStore
-
public class ArrayEventStore extends Object
A data structure which stores events during search, for lazy explanation purpose. Created by cprudhom on 13/11/14. Project: choco.- Since:
- 13/11/14
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description ArrayEventStore(IEnvironment env)Create an event store
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforgetLast()Forget the last event pushedICausegetCause(int evt)IEventTypegetEventType(int evt)intgetFirstValue(int evt)intgetSecondValue(int evt)intgetSize()intgetThirdValue(int evt)IntVargetVariable(int evt)voidpushEvent(IntVar var, ICause cause, IEventType mask, int one, int two, int three)Push an event on the top of this store
-
-
-
Constructor Detail
-
ArrayEventStore
public ArrayEventStore(IEnvironment env)
Create an event store- Parameters:
env- backtracking environment
-
-
Method Detail
-
pushEvent
public void pushEvent(IntVar var, ICause cause, IEventType mask, int one, int two, int three)
Push an event on the top of this store- Parameters:
var- modified variablecause- cause of the modificationmask- modification maskone- an inttwo- an intthree- an int
-
forgetLast
public void forgetLast()
Forget the last event pushed
-
getSize
public int getSize()
- Returns:
- number of events stored in this
-
getVariable
public IntVar getVariable(int evt)
- Parameters:
evt- event index- Returns:
- the variable associated to the event in position evt
-
getEventType
public IEventType getEventType(int evt)
- Parameters:
evt- event index- Returns:
- the event type associated to the event in position evt
-
getCause
public ICause getCause(int evt)
- Parameters:
evt- event index- Returns:
- the cause associated to the event in position evt
-
getFirstValue
public int getFirstValue(int evt)
- Parameters:
evt- event index- Returns:
- the first integer associated to the event in position evt
-
getSecondValue
public int getSecondValue(int evt)
- Parameters:
evt- event index- Returns:
- the second associated to the event in position evt
-
getThirdValue
public int getThirdValue(int evt)
- Parameters:
evt- event index- Returns:
- the third associated to the event in position evt
-
-