Package org.arakhne.afc.math.graph
Interface GraphCourseModel<ST extends GraphSegment<ST,PT>,PT extends GraphPoint<PT,ST>>
-
- Type Parameters:
PT
- is the type of node in the graphST
- is the type of edge in the graph
- All Known Implementing Classes:
BreadthFirstGraphCourseModel
,DepthFirstGraphCourseModel
,ShortestSegmentFirstGraphCourseModel
public interface GraphCourseModel<ST extends GraphSegment<ST,PT>,PT extends GraphPoint<PT,ST>>
This class permits to implement specifical algorithm to make a course inside a graph.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:42
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgraph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addIterationElement(GraphIterationElement<ST,PT> element)
Add an element to iterate on.GraphIterationElement<ST,PT>
getNextIterationElement()
Replies the next element without removing it from the iterator list.boolean
isEmpty()
Replies if the model contains an element to iterate one.boolean
isReversedRestitution()
Replies if this model restitutes the elements in a reverse order.void
removeIterationElements(Iterable<GraphIterationElement<ST,PT>> elements)
Remove the specified iteration elements.GraphIterationElement<ST,PT>
removeNextIterationElement()
Replies the next element and removes it from the iterator list.
-
-
-
Method Detail
-
isReversedRestitution
@Pure boolean isReversedRestitution()
Replies if this model restitutes the elements in a reverse order.If
true
this model is assumed to replies theGraphIterationElement
in the reverse order than the sequence of calls toaddIterationElement()
. Iffalse
this model is assumed to replies theGraphIterationElement
in the same order as the sequence of calls toaddIterationElement()
.- Returns:
true
if reversed, otherwisefalse
-
addIterationElement
void addIterationElement(GraphIterationElement<ST,PT> element)
Add an element to iterate on.- Parameters:
element
- is the element which could be the result of a future iteration.
-
isEmpty
@Pure boolean isEmpty()
Replies if the model contains an element to iterate one.- Returns:
true
if an element exists, otherwhisefalse
.
-
getNextIterationElement
GraphIterationElement<ST,PT> getNextIterationElement()
Replies the next element without removing it from the iterator list.- Returns:
- the next element
-
removeNextIterationElement
GraphIterationElement<ST,PT> removeNextIterationElement()
Replies the next element and removes it from the iterator list.- Returns:
- the next element
-
removeIterationElements
void removeIterationElements(Iterable<GraphIterationElement<ST,PT>> elements)
Remove the specified iteration elements.- Parameters:
elements
- the elements to remove.- Since:
- 16.0
-
-