Module org.chocosolver
Class StoredDirectedMultiGraph
- java.lang.Object
-
- org.chocosolver.solver.constraints.nary.automata.structure.multicostregular.StoredDirectedMultiGraph
-
public class StoredDirectedMultiGraph extends Object
Created by IntelliJ IDEA. User: julien Mail: julien.menana{at}emn.fr Date: Nov 4, 2009 Time: 1:07:19 PM
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
StoredDirectedMultiGraph.Arcs
class
StoredDirectedMultiGraph.Nodes
-
Field Summary
Fields Modifier and Type Field Description StoredDirectedMultiGraph.Arcs
GArcs
StoredDirectedMultiGraph.Nodes
GNodes
BitSet
inStack
StoredIndexedBipartiteSetWithOffset[]
layers
int
nbR
int
sourceIndex
int
tinIndex
-
Constructor Summary
Constructors Constructor Description StoredDirectedMultiGraph(IEnvironment environment, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, int[][] layers, int[] starts, int[] offsets, int supportLength, ICostAutomaton pi, IntVar[] z)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delayedBoundUpdate(gnu.trove.stack.TIntStack toRemove, IntVar[] z, int... dim)
BitSet
getInStack()
Getter to the is arc in to be removed stack bitSetdouble[]
getInstantiatedLayerCosts(int layer)
int[]
getMinMaxPathCostForAssignment(int layer, int value, int... resources)
int
getMinPathCost(int... resources)
int
getMinPathCostForAssignment(int layer, int value, int... resources)
FastPathFinder
getPathFinder()
int
getRegret(int layer, int value, int... resources)
StoredIndexedBipartiteSetWithOffset
getUBport(int i, int j)
boolean
isInStack(int idx)
Getter, the idx th bit of the inStack bitSetvoid
makePathFinder()
boolean
removeArc(int arcId, gnu.trove.stack.TIntStack toRemove, gnu.trove.stack.TIntStack[] updateLeft, gnu.trove.stack.TIntStack[] updateRight, Propagator<IntVar> propagator)
void
setInStack(int idx)
Set the idx th bit of the to be removed bitsetvoid
updateLeft(gnu.trove.stack.TIntStack updateLeft, gnu.trove.stack.TIntStack toRemove, int dim, boolean[] modBound, Propagator<IntVar> propagator)
void
updateRight(gnu.trove.stack.TIntStack updateRight, gnu.trove.stack.TIntStack toRemove, int dim, boolean[] modBound, Propagator<IntVar> propagator)
-
-
-
Field Detail
-
sourceIndex
public int sourceIndex
-
tinIndex
public int tinIndex
-
nbR
public int nbR
-
layers
public StoredIndexedBipartiteSetWithOffset[] layers
-
inStack
public BitSet inStack
-
GNodes
public StoredDirectedMultiGraph.Nodes GNodes
-
GArcs
public StoredDirectedMultiGraph.Arcs GArcs
-
-
Constructor Detail
-
StoredDirectedMultiGraph
public StoredDirectedMultiGraph(IEnvironment environment, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, int[][] layers, int[] starts, int[] offsets, int supportLength, ICostAutomaton pi, IntVar[] z)
-
-
Method Detail
-
delayedBoundUpdate
public void delayedBoundUpdate(gnu.trove.stack.TIntStack toRemove, IntVar[] z, int... dim)
-
makePathFinder
public final void makePathFinder()
-
getUBport
public final StoredIndexedBipartiteSetWithOffset getUBport(int i, int j)
-
getPathFinder
public final FastPathFinder getPathFinder()
-
removeArc
public boolean removeArc(int arcId, gnu.trove.stack.TIntStack toRemove, gnu.trove.stack.TIntStack[] updateLeft, gnu.trove.stack.TIntStack[] updateRight, Propagator<IntVar> propagator) throws ContradictionException
- Throws:
ContradictionException
-
updateRight
public void updateRight(gnu.trove.stack.TIntStack updateRight, gnu.trove.stack.TIntStack toRemove, int dim, boolean[] modBound, Propagator<IntVar> propagator) throws ContradictionException
- Throws:
ContradictionException
-
updateLeft
public void updateLeft(gnu.trove.stack.TIntStack updateLeft, gnu.trove.stack.TIntStack toRemove, int dim, boolean[] modBound, Propagator<IntVar> propagator) throws ContradictionException
- Throws:
ContradictionException
-
getInStack
public final BitSet getInStack()
Getter to the is arc in to be removed stack bitSet- Returns:
- an instance of a storable bitset
-
isInStack
public final boolean isInStack(int idx)
Getter, the idx th bit of the inStack bitSet- Parameters:
idx
- the index of the arc- Returns:
- true if a given arc is to be deleted
-
setInStack
public final void setInStack(int idx)
Set the idx th bit of the to be removed bitset- Parameters:
idx
- the index of the bit
-
getRegret
public int getRegret(int layer, int value, int... resources)
-
getMinPathCostForAssignment
public int getMinPathCostForAssignment(int layer, int value, int... resources)
-
getMinMaxPathCostForAssignment
public int[] getMinMaxPathCostForAssignment(int layer, int value, int... resources)
-
getInstantiatedLayerCosts
public double[] getInstantiatedLayerCosts(int layer)
-
getMinPathCost
public int getMinPathCost(int... resources)
-
-