choco.kernel.solver.constraints.global.automata.fast_multicostregular.structure
Class SoftStoredMultiValuedDirectedMultiGraph

java.lang.Object
  extended by choco.kernel.solver.constraints.global.automata.fast_multicostregular.structure.SoftStoredMultiValuedDirectedMultiGraph

public class SoftStoredMultiValuedDirectedMultiGraph
extends Object

Created by IntelliJ IDEA. User: julien Date: Apr 28, 2010 Time: 3:17:28 PM


Nested Class Summary
 class SoftStoredMultiValuedDirectedMultiGraph.Arcs
           
 class SoftStoredMultiValuedDirectedMultiGraph.Nodes
           
 
Field Summary
 AbstractIntSConstraint constraint
           
 SoftStoredMultiValuedDirectedMultiGraph.Arcs GArcs
           
 SoftStoredMultiValuedDirectedMultiGraph.Nodes GNodes
           
 BitSet inStack
           
 StoredIndexedBipartiteSetWithOffset[] layers
           
 int nbR
           
 int[] offsets
           
 SoftPathFinder pf
           
 int sourceIndex
           
 int tinIndex
           
 
Constructor Summary
SoftStoredMultiValuedDirectedMultiGraph(IEnvironment environment, AbstractIntSConstraint constraint, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, int[][] layers, int[] starts, int[] offsets, int supportLength, int[][][][] costs, IntDomainVar[] y)
           
 
Method Summary
 void clearInStack(int idx)
          Clear the idx th bit of the to be removed bitset
 void delayedBoundUpdate(gnu.trove.TIntStack toRemove, IntDomainVar[] z, int... dim)
           
 BitSet getInStack()
          Getter to the is arc in to be removed stack bitSet
 double[] getInstantiatedLayerCosts(int layer)
           
 int[] getMinMaxPathCostForAssignment(int layer, int value, int... resources)
           
 int getMinPathCost(int... resources)
           
 int getMinPathCostForAssignment(int layer, int value, int... resources)
           
 int getRegret(int layer, int value, int... resources)
           
 StoredIndexedBipartiteSetWithOffset getSupport(int i, int j)
           
 boolean isInStack(int idx)
          Getter, the idx th bit of the inStack bitSet
 boolean removeArc(int arcId, gnu.trove.TIntStack toRemove, gnu.trove.TIntStack[] updateLeft, gnu.trove.TIntStack[] updateRight)
           
 void setInStack(int idx)
          Set the idx th bit of the to be removed bitset
 boolean updateLeft(gnu.trove.TIntStack updateLeft, gnu.trove.TIntStack toRemove, int dim, AbstractIntSConstraint table)
           
 boolean updateRight(gnu.trove.TIntStack updateRight, gnu.trove.TIntStack toRemove, int dim, AbstractIntSConstraint table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraint

public AbstractIntSConstraint constraint

offsets

public int[] offsets

sourceIndex

public int sourceIndex

tinIndex

public int tinIndex

nbR

public int nbR

layers

public StoredIndexedBipartiteSetWithOffset[] layers

pf

public SoftPathFinder pf

inStack

public BitSet inStack

GNodes

public SoftStoredMultiValuedDirectedMultiGraph.Nodes GNodes

GArcs

public SoftStoredMultiValuedDirectedMultiGraph.Arcs GArcs
Constructor Detail

SoftStoredMultiValuedDirectedMultiGraph

public SoftStoredMultiValuedDirectedMultiGraph(IEnvironment environment,
                                               AbstractIntSConstraint constraint,
                                               org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph,
                                               int[][] layers,
                                               int[] starts,
                                               int[] offsets,
                                               int supportLength,
                                               int[][][][] costs,
                                               IntDomainVar[] y)
Method Detail

getSupport

public final StoredIndexedBipartiteSetWithOffset getSupport(int i,
                                                            int j)

delayedBoundUpdate

public void delayedBoundUpdate(gnu.trove.TIntStack toRemove,
                               IntDomainVar[] z,
                               int... dim)

removeArc

public boolean removeArc(int arcId,
                         gnu.trove.TIntStack toRemove,
                         gnu.trove.TIntStack[] updateLeft,
                         gnu.trove.TIntStack[] updateRight)
                  throws ContradictionException
Throws:
ContradictionException

updateRight

public boolean updateRight(gnu.trove.TIntStack updateRight,
                           gnu.trove.TIntStack toRemove,
                           int dim,
                           AbstractIntSConstraint table)
                    throws ContradictionException
Throws:
ContradictionException

updateLeft

public boolean updateLeft(gnu.trove.TIntStack updateLeft,
                          gnu.trove.TIntStack toRemove,
                          int dim,
                          AbstractIntSConstraint table)
                   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

clearInStack

public final void clearInStack(int idx)
Clear 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)

getMinPathCost

public int getMinPathCost(int... resources)

getInstantiatedLayerCosts

public double[] getInstantiatedLayerCosts(int layer)


Copyright © 2012. All Rights Reserved.