Package com.jgalgo.alg.traversal
Interface RandomWalkIter.Int
- All Superinterfaces:
IntIterator
,Iterator<Integer>
,PrimitiveIterator<Integer,
,IntConsumer> PrimitiveIterator.OfInt
,RandomizedAlgorithm
,RandomWalkIter<Integer,
Integer>
- Enclosing interface:
RandomWalkIter<V,
E>
A random walk iterator for
IntGraph
.- Author:
- Barak Ugav
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
Nested classes/interfaces inherited from interface com.jgalgo.alg.traversal.RandomWalkIter
RandomWalkIter.Int
-
Method Summary
Modifier and TypeMethodDescriptiondefault Integer
lastEdge()
Deprecated.int
Get the edge that led to the last vertex returned bynextInt()
.default Integer
next()
Deprecated.Please use the corresponding type-specific method instead.int
nextInt()
Advance the iterator from the current vertex along one of its out edges and return the vertex reached.Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator
forEachRemaining, forEachRemaining, skip
Methods inherited from interface java.util.PrimitiveIterator.OfInt
forEachRemaining
Methods inherited from interface com.jgalgo.alg.common.RandomizedAlgorithm
setSeed
Methods inherited from interface com.jgalgo.alg.traversal.RandomWalkIter
hasNext
-
Method Details
-
nextInt
int nextInt()Advance the iterator from the current vertex along one of its out edges and return the vertex reached.- Specified by:
nextInt
in interfaceIntIterator
- Specified by:
nextInt
in interfacePrimitiveIterator.OfInt
-
next
Deprecated.Please use the corresponding type-specific method instead.Advance the iterator from the current vertex along one of its out edges and return the vertex reached.- Specified by:
next
in interfaceIntIterator
- Specified by:
next
in interfaceIterator<Integer>
- Specified by:
next
in interfacePrimitiveIterator.OfInt
- Specified by:
next
in interfaceRandomWalkIter<Integer,
Integer>
-
lastEdgeInt
int lastEdgeInt()Get the edge that led to the last vertex returned bynextInt()
.The behavior is undefined if
nextInt()
was not called yet.- Returns:
- the edge that led to the last vertex returned by
nextInt()
-
lastEdge
Deprecated.Please uselastEdgeInt()
instead to avoid un/boxing.Get the edge that led to the last vertex returned byRandomWalkIter.next()
.The behavior is undefined if
RandomWalkIter.next()
was not called yet.- Specified by:
lastEdge
in interfaceRandomWalkIter<Integer,
Integer> - Returns:
- the edge that led to the last vertex returned by
RandomWalkIter.next()
-
lastEdgeInt()
instead to avoid un/boxing.