|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.constraints.global.tree.structure.internalStructure.graphStructures.graphViews.StoredBitSetGraph
public class StoredBitSetGraph
the core class that allow to represent a graph and a set of properties that can be dynamically maintained.
Nested Class Summary | |
---|---|
static class |
StoredBitSetGraph.Maintain
list of graph properties that can be maintained for a given graph |
Field Summary | |
---|---|
protected boolean |
affiche
boolean for debug and show a trace of the execution |
protected ConnectedComponents |
cc
connected component structure associated with the graph |
protected int[] |
dfsTree
resulting labelling of the nodes involved in the graph according to a depth first search |
protected IStateBitSet[] |
graph
backtrackable bitset matrix representing the graph |
protected int |
idx
reference idx in a depth first search |
protected static Logger |
LOGGER
|
protected IStateInt |
nbCC
backtrackable integer recording the current number of connected components |
protected int |
nbNodes
total number of nodes involved in the graph |
protected boolean |
needUpdate
|
protected IStateBitSet[] |
numFromVertCC
|
protected List<StoredBitSetGraph.Maintain> |
params
list of graph properties to maintain for the graph |
protected IStateBitSet[] |
revGraph
backtrackable bitset matrix representing the reverse graph |
protected IStateBitSet[] |
revTcGraph
backtrackable bitset matrix representing the reverse transitive closure of the graph |
protected IStateBitSet[] |
revTrGraph
backtrackable bitset matrix representing the reverse transitive reduction of the graph |
protected Vector<IStateBitSet> |
setCC
|
protected IStateBitSet |
sinkNodes
backtrackable bitset that store the sink nodes of the graph |
protected Solver |
solver
Choco solver embedding the tree constraint |
protected IStateBitSet |
srcNodes
backtrackable bitset that store the source nodes of the graph |
protected IStateBitSet[] |
tcGraph
backtrackable bitset matrix representing the transitive closure of the graph |
protected IStateBitSet[] |
trGraph
backtrackable bitset matrix representing the transitive reduction of the graph |
protected IStateBitSet[] |
vertFromNumCC
|
Constructor Summary | |
---|---|
StoredBitSetGraph(Solver solver,
IStateBitSet[] graph,
List<StoredBitSetGraph.Maintain> params,
boolean affiche)
|
Method Summary | |
---|---|
void |
addArc(int u,
int v)
add the arc (u,v) in the graph view structure (required properties are dynamically updated) |
void |
affiche()
|
IStateBitSet |
getAncestors(int i)
|
IStateBitSet |
getDescendants(int i)
|
IStateBitSet[] |
getGraph()
|
int |
getGraphSize()
|
IStateInt |
getNbCC()
|
IStateBitSet[] |
getNumFromVertCC()
|
IStateBitSet |
getPredecessors(int i)
|
IStateBitSet[] |
getRevGraph()
|
IStateBitSet[] |
getRevTcGraph()
|
IStateBitSet[] |
getRevTrGraph()
|
Vector<IStateBitSet> |
getSetCC()
|
IStateBitSet |
getSinkNodes()
|
IStateBitSet |
getSrcNodes()
|
IStateBitSet |
getSuccessors(int i)
|
IStateBitSet[] |
getTcGraph()
|
IStateBitSet[] |
getTrGraph()
|
IStateBitSet[] |
getVertFromNumCC()
|
void |
razGraph()
|
void |
remAllExcepted(int u,
int v)
remove all the successors of node u, excepted node v, from the graph view structure (required properties are dynamically updated) |
void |
remAllGreaterIdx(int u,
int idx)
remove all the successors of node u that have an index higher than idx (required properties are dynamically updated) |
void |
remAllIdx(int u,
int inf,
int sup)
remove all the successors of node u that have an index below to inf and higher than sup (required properties are dynamically updated) |
void |
remAllLowerIdx(int u,
int idx)
remove all the successors of node u that have an index below to idx (required properties are dynamically updated) |
void |
remAllNodes(int u,
DisposableIntIterator deltaDomain)
all the arc (u,v), such that v belongs to the set depicted by the iterator, are removed |
void |
remAllSucc(int u)
remove all the successors of node u from the graph view structure (required properties are dynamically updated) |
void |
remArc(int u,
int v)
remove the arc (u,v) from the graph view structure (required properties are dynamically updated) |
void |
setGraph(IStateBitSet[] newGraph)
|
void |
showAllDesc(String type)
|
String |
showDesc(int i,
String type)
|
void |
showGraph(String type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected Solver solver
protected List<StoredBitSetGraph.Maintain> params
protected int nbNodes
protected int idx
protected int[] dfsTree
protected IStateBitSet[] graph
protected IStateBitSet[] revGraph
protected IStateBitSet[] tcGraph
protected IStateBitSet[] revTcGraph
protected boolean needUpdate
protected IStateBitSet[] trGraph
protected IStateBitSet[] revTrGraph
protected IStateBitSet srcNodes
protected IStateBitSet sinkNodes
protected ConnectedComponents cc
protected Vector<IStateBitSet> setCC
protected IStateBitSet[] vertFromNumCC
protected IStateBitSet[] numFromVertCC
protected IStateInt nbCC
protected boolean affiche
Constructor Detail |
---|
public StoredBitSetGraph(Solver solver, IStateBitSet[] graph, List<StoredBitSetGraph.Maintain> params, boolean affiche)
Method Detail |
---|
public void addArc(int u, int v)
u
- index of a nodev
- index of a nodepublic void remArc(int u, int v)
u
- index of a nodev
- index of a nodepublic void remAllSucc(int u)
u
- index of a nodepublic void remAllExcepted(int u, int v)
u
- index of a nodev
- index of a nodepublic void remAllLowerIdx(int u, int idx)
u
- index of a nodeidx
- integer valuepublic void remAllGreaterIdx(int u, int idx)
u
- index of a nodeidx
- integer valuepublic void remAllIdx(int u, int inf, int sup)
u
- index of a nodeinf
- integer valuesup
- integer valuepublic void remAllNodes(int u, DisposableIntIterator deltaDomain)
u
- index of a nodedeltaDomain
- an iterator over the removed indicespublic int getGraphSize()
public IStateBitSet getSuccessors(int i)
public IStateBitSet getPredecessors(int i)
public IStateBitSet getDescendants(int i)
public IStateBitSet getAncestors(int i)
public IStateBitSet[] getGraph()
public void setGraph(IStateBitSet[] newGraph)
public void razGraph()
public IStateBitSet[] getRevGraph()
public IStateBitSet[] getTcGraph()
public IStateBitSet[] getRevTcGraph()
public IStateBitSet[] getTrGraph()
public IStateBitSet[] getRevTrGraph()
public IStateBitSet getSrcNodes()
public IStateBitSet getSinkNodes()
public Vector<IStateBitSet> getSetCC()
public IStateBitSet[] getVertFromNumCC()
public IStateBitSet[] getNumFromVertCC()
public IStateInt getNbCC()
public String showDesc(int i, String type)
public void showAllDesc(String type)
public void showGraph(String type)
public void affiche()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |