choco.cp.solver.constraints.global.tree.structure.internalStructure.graphStructures.graphViews
Class VarGraphView

java.lang.Object
  extended by choco.cp.solver.constraints.global.tree.structure.internalStructure.graphStructures.graphViews.VarGraphView

public class VarGraphView
extends Object


Field Summary
protected  boolean affiche
          boolean for debug and show a trace of the execution
protected  StoredBitSetGraph global
          data structure of the graph to partition
protected  IStateBitSet[] globalGraph
          backtrackable bitset matrix representing the graph to partition
protected  List<StoredBitSetGraph.Maintain> globalParams
          list of graph properties to maintain for the graph to partition
protected static Logger LOGGER
           
protected  StoredBitSetGraph maybe
          data structure of the potential graph associated with global
protected  IStateBitSet[] maybeGraph
          backtrackable bitset matrix representing the potential graph
protected  List<StoredBitSetGraph.Maintain> maybeParams
          list of graph properties to maintain for the potential graph to partition
protected  int nbNodes
          total number of nodes involved in the graph
protected  IStateBitSet potentialRoots
          backtrackable bitset that store the potential roots involved in global
protected  ReducedGraph reducedGraph
          reduced graph structure associated with global
protected  IntDomainVar[] s
          the successor variables depicting the graph to partition
protected  Solver solver
          Choco solver embedding the tree constraint
protected  StoredBitSetGraph sure
          data structure of the required graph associated with global
protected  IStateBitSet[] sureGraph
          backtrackable bitset matrix representing the required graph
protected  List<StoredBitSetGraph.Maintain> sureParams
          list of graph properties to maintain for the required graph to partition
 
Constructor Summary
VarGraphView(Solver solver, IntDomainVar[] vars)
          Constructor of the graph view
 
Method Summary
 int getFixedSucc(int u)
           
 StoredBitSetGraph getGlobal()
           
 StoredBitSetGraph getMaybe()
           
 int getNbNodes()
           
 IStateBitSet getPotentialRoots()
           
 ReducedGraph getReducedGraph()
           
 Solver getSolver()
           
 StoredBitSetGraph getSure()
           
 boolean isFixedSucc(int u)
           
 void showGlobal()
           
 void showMaybe()
           
 void showSure()
           
 void updateOnBounds(int u)
          remove all the successors of u with an index below to s[u].getInf() and higher than s[u].getSup()
 void updateOnInf(int u)
          remove all the successors of u with an index below to s[u].getInf()
 void updateOnInst(int u)
          an arc (u,v) is fixed
 void updateOnRem(int u, int v)
          an arc (u,v) is removed from the graph
 void updateOnRemovals(int u, DisposableIntIterator deltaDomain)
          all the arc (u,v), such that v belongs to the set depicted by the iterator, are removed
 void updateOnSup(int u)
          remove all the successors of u with an index higher than s[u].getSup()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER

affiche

protected boolean affiche
boolean for debug and show a trace of the execution


solver

protected Solver solver
Choco solver embedding the tree constraint


s

protected IntDomainVar[] s
the successor variables depicting the graph to partition


globalParams

protected List<StoredBitSetGraph.Maintain> globalParams
list of graph properties to maintain for the graph to partition


sureParams

protected List<StoredBitSetGraph.Maintain> sureParams
list of graph properties to maintain for the required graph to partition


maybeParams

protected List<StoredBitSetGraph.Maintain> maybeParams
list of graph properties to maintain for the potential graph to partition


nbNodes

protected int nbNodes
total number of nodes involved in the graph


global

protected StoredBitSetGraph global
data structure of the graph to partition


sure

protected StoredBitSetGraph sure
data structure of the required graph associated with global


maybe

protected StoredBitSetGraph maybe
data structure of the potential graph associated with global


globalGraph

protected IStateBitSet[] globalGraph
backtrackable bitset matrix representing the graph to partition


sureGraph

protected IStateBitSet[] sureGraph
backtrackable bitset matrix representing the required graph


maybeGraph

protected IStateBitSet[] maybeGraph
backtrackable bitset matrix representing the potential graph


reducedGraph

protected ReducedGraph reducedGraph
reduced graph structure associated with global


potentialRoots

protected IStateBitSet potentialRoots
backtrackable bitset that store the potential roots involved in global

Constructor Detail

VarGraphView

public VarGraphView(Solver solver,
                    IntDomainVar[] vars)
Constructor of the graph view

Parameters:
solver - the Choco solver who uses the current tree constraint
vars - the successor variables depicting the graph to partition
Method Detail

updateOnRem

public void updateOnRem(int u,
                        int v)
an arc (u,v) is removed from the graph

Parameters:
u - index of a node
v - index of a node

updateOnInst

public void updateOnInst(int u)
an arc (u,v) is fixed

Parameters:
u - index of a node

updateOnRemovals

public void updateOnRemovals(int u,
                             DisposableIntIterator deltaDomain)
all the arc (u,v), such that v belongs to the set depicted by the iterator, are removed

Parameters:
u - index of a node
deltaDomain - an iterator over the removed indices

updateOnInf

public void updateOnInf(int u)
remove all the successors of u with an index below to s[u].getInf()

Parameters:
u - index of a node

updateOnSup

public void updateOnSup(int u)
remove all the successors of u with an index higher than s[u].getSup()

Parameters:
u - index of a node

updateOnBounds

public void updateOnBounds(int u)
remove all the successors of u with an index below to s[u].getInf() and higher than s[u].getSup()

Parameters:
u - index of a node

isFixedSucc

public boolean isFixedSucc(int u)
Parameters:
u - index of a node
Returns:
true iff an outgoing arc from node u is fixed

getFixedSucc

public int getFixedSucc(int u)
Parameters:
u - index of a node
Returns:
the index of the required successor of node u

getNbNodes

public int getNbNodes()

getSolver

public Solver getSolver()

getGlobal

public StoredBitSetGraph getGlobal()

getSure

public StoredBitSetGraph getSure()

getMaybe

public StoredBitSetGraph getMaybe()

getPotentialRoots

public IStateBitSet getPotentialRoots()

getReducedGraph

public ReducedGraph getReducedGraph()

showSure

public void showSure()

showMaybe

public void showMaybe()

showGlobal

public void showGlobal()


Copyright © 2012. All Rights Reserved.