public TarjanIslandPruner(StreetLayer streetLayer, int minComponentSize, StreetMode mode) { this.streets = streetLayer; this.minComponentSize = minComponentSize; this.mode = mode; tarjanStack = new TIntArrayStack(); onTarjanStack = new BitSet(); toExplore = new TIntArrayStack(); lowestDiscoveryIndexOfReachableVertexKnownToBePredecessor = new int[streets.getVertexCount()]; Arrays.fill(lowestDiscoveryIndexOfReachableVertexKnownToBePredecessor, -1); discoveryIndex = new int[streets.getVertexCount()]; Arrays.fill(discoveryIndex, -1); edgeCursor = streetLayer.edgeStore.getCursor(); }
public TarjanIslandPruner(StreetLayer streetLayer, int minComponentSize, StreetMode mode) { this.streets = streetLayer; this.minComponentSize = minComponentSize; this.mode = mode; tarjanStack = new TIntArrayStack(); onTarjanStack = new BitSet(); toExplore = new TIntArrayStack(); lowestDiscoveryIndexOfReachableVertexKnownToBePredecessor = new int[streets.getVertexCount()]; Arrays.fill(lowestDiscoveryIndexOfReachableVertexKnownToBePredecessor, -1); discoveryIndex = new int[streets.getVertexCount()]; Arrays.fill(discoveryIndex, -1); edgeCursor = streetLayer.edgeStore.getCursor(); }
/** * Creates a new <code>PropSort</code> instance. * * @param x the first array of integer variables * @param y the second array of integer variables */ public PropSort(IntVar[] x, IntVar[] y) { super(ArrayUtils.append(x, y), PropagatorPriority.LINEAR, false); if (x.length != y.length || x.length == 0) { throw new IllegalArgumentException("PropSort Error: the two vectors " + "must be of the same (non zero) size"); } this.n = x.length; this.x = x; this.y = y; this.f = new int[this.n]; this.fPrime = new int[this.n]; this.xyGraph = new int[this.n][this.n]; this.sccSequences = new int[this.n][this.n]; this.dfsNodes = new int[this.n]; this.sccNumbers = new int[this.n]; this.tmpArray = new int[this.n]; this.pQueue = new PriorityQueue(this.n); this.s1 = new TIntArrayStack(this.n); this.s2 = new Stack2(this.n); }
this.map.put(vars[i], i); this.toRemove = new TIntArrayStack(); this.toUpdateLeft = new TIntArrayStack[nbR + 1]; this.toUpdateRight = new TIntArrayStack[nbR + 1]; this.toUpdateLeft[i] = new TIntArrayStack(); this.toUpdateRight[i] = new TIntArrayStack();
public TarjansSCCAlgorithm( GraphHopperStorage graph, GHBitSet ignoreSet, final EdgeFilter edgeFilter ) { this.graph = graph; this.nodeStack = new TIntArrayStack(); this.onStack = new GHBitSetImpl(graph.getNodes()); this.nodeIndex = new int[graph.getNodes()]; this.nodeLowLink = new int[graph.getNodes()]; this.edgeFilter = edgeFilter; this.ignoreSet = ignoreSet; }
public PropCostRegular(IntVar[] variables, ICostAutomaton cautomaton, StoredValuedDirectedMultiGraph graph) { super(variables, PropagatorPriority.CUBIC, true); this.idms = new IIntDeltaMonitor[this.vars.length - 1]; for (int i = 0; i < this.vars.length - 1; i++) { idms[i] = this.vars[i].monitorDelta(this); } this.zIdx = vars.length - 1; this.rem_proc = new RemProc(this); IEnvironment environment = model.getEnvironment(); this.toRemove = new TIntArrayStack(); this.boundChange = environment.makeBool(false); this.graph = graph; this.cautomaton = cautomaton; }
this.sourceIndex = layers[0][0]; this.tinkIndex = layers[layers.length - 1][0]; this.toUpdateLeft = new TIntArrayStack(); this.toUpdateRight = new TIntArrayStack();
TIntStack parents = new TIntArrayStack(); parents.push(rootNodeId); TIntStack parentsEntry = new TIntArrayStack(); parentsEntry.push(-1);
int parentEntry = 0; final TIntStack eliminatedNodeIds = new TIntArrayStack();
/** * beginning with startNode add all following nodes to LIFO queue. If node has been already * explored before, skip reexploration. */ @Override public void start( EdgeExplorer explorer, int startNode ) { TIntArrayStack stack = new TIntArrayStack(); GHBitSet explored = createBitSet(); stack.push(startNode); int current; while (stack.size() > 0) { current = stack.pop(); if (!explored.contains(current) && goFurther(current)) { EdgeIterator iter = explorer.setBaseNode(current); while (iter.next()) { int connectedId = iter.getAdjNode(); if (checkAdjacent(iter)) { stack.push(connectedId); } } explored.add(current); } } }
int parentEntry = 0; TIntStack eliminatedNodeIds = new TIntArrayStack();
TIntStack parents = new TIntArrayStack(); parents.push(rootNodeId); TIntStack parentsEntry = new TIntArrayStack(); parentsEntry.push(-1);