Package org.arakhne.afc.math.tree
Interface DepthFirstIterableTree<D,N extends TreeNode<D,?>>
-
- Type Parameters:
D- is the type of the data inside the treeN- is the type of the tree nodes.
- All Known Implementing Classes:
AbstractTree,LinkedTree
public interface DepthFirstIterableTree<D,N extends TreeNode<D,?>> extends Tree<D,N>
This is the generic implementation of a tree service that permits to iterator with a depth-first approach.This is the public interface for a tree which is independent of the tree implementation.
- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:41
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathtree
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterator<D>dataDepthFirstIterator()Replies a prefixed depth first iterator on the tree.Iterator<N>depthFirstIterator()Replies a depth-first iterator on nodes.Iterator<N>depthFirstIterator(int infixPosition)Replies the infixes depth first iterator on the tree.Iterator<N>depthFirstIterator(DepthFirstNodeOrder nodeOrder)Replies a depth-first iterator on nodes.Iterable<D>toDataDepthFirstIterable()Replies the depth first iterator on the tree.Iterable<D>toDataDepthFirstIterable(int infixPosition)Replies the infixed depth first iterator on the tree.Iterable<D>toDataDepthFirstIterable(DepthFirstNodeOrder nodeOrder)Replies the depth first iterator on the tree.Iterable<N>toDepthFirstIterable()Replies the depth first iterator on the tree.Iterable<N>toDepthFirstIterable(int infixPosition)Replies the infixed depth first iterator on the tree.Iterable<N>toDepthFirstIterable(DepthFirstNodeOrder nodeOrder)Replies the depth first iterator on the tree.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.arakhne.afc.math.tree.Tree
broadFirstIterator, clear, dataBroadFirstIterator, dataDepthFirstIterator, dataDepthFirstIterator, getHeights, getMaxHeight, getMinHeight, getNodeCount, getRoot, getUserDataCount, isEmpty, setRoot
-
-
-
-
Method Detail
-
depthFirstIterator
@Pure Iterator<N> depthFirstIterator(DepthFirstNodeOrder nodeOrder)
Description copied from interface:TreeReplies a depth-first iterator on nodes.
-
depthFirstIterator
@Pure Iterator<N> depthFirstIterator(int infixPosition)
Replies the infixes depth first iterator on the tree.- Parameters:
infixPosition- is the index at which the parent will be treated according to its child set.- Returns:
- the iterator on nodes
- See Also:
InfixDepthFirstTreeIterator
-
depthFirstIterator
@Pure Iterator<N> depthFirstIterator()
Description copied from interface:TreeReplies a depth-first iterator on nodes.
-
dataDepthFirstIterator
@Pure Iterator<D> dataDepthFirstIterator()
Description copied from interface:TreeReplies a prefixed depth first iterator on the tree.
-
toDepthFirstIterable
@Pure Iterable<N> toDepthFirstIterable()
Replies the depth first iterator on the tree.- Returns:
- the iterator on nodes
-
toDepthFirstIterable
@Pure Iterable<N> toDepthFirstIterable(DepthFirstNodeOrder nodeOrder)
Replies the depth first iterator on the tree.- Parameters:
nodeOrder- is the order in which the parent node will be treated in comparison to its children.- Returns:
- the iterator on nodes
-
toDepthFirstIterable
@Pure Iterable<N> toDepthFirstIterable(int infixPosition)
Replies the infixed depth first iterator on the tree.- Parameters:
infixPosition- is the index at which the parent will be treated according to its child set.- Returns:
- the iterator on nodes
- See Also:
InfixDepthFirstTreeIterator
-
toDataDepthFirstIterable
@Pure Iterable<D> toDataDepthFirstIterable()
Replies the depth first iterator on the tree.- Returns:
- the iterator on user data
-
toDataDepthFirstIterable
@Pure Iterable<D> toDataDepthFirstIterable(DepthFirstNodeOrder nodeOrder)
Replies the depth first iterator on the tree.- Parameters:
nodeOrder- is the order in which the parent node will be treated in comparison to its children.- Returns:
- the iterator on user data
-
toDataDepthFirstIterable
@Pure Iterable<D> toDataDepthFirstIterable(int infixPosition)
Replies the infixed depth first iterator on the tree.- Parameters:
infixPosition- is the index at which the parent will be treated according to its child set.- Returns:
- the iterator on user data
- See Also:
InfixDepthFirstTreeIterator
-
-