|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PathAlgebra<NumType extends Comparable<NumType>>
This interface contains the operations which are needed to calculate the weights of paths in graphs. Usually, this will involve summing the numeric weights of individual edges and taking the minimum over all possible paths to a node, but different usages are supported.
Method Summary | |
---|---|
NumType |
add(NumType pathLenOne,
NumType pathLenTwo)
Add the length of to paths, yielding the length of the combined path |
NumType |
emptyPathLen()
Return a value 'zero' which must be the neutral element of the operation max and is equal to the length of an empty path. |
NumType |
infinitePathLen()
Return a value 'infinity' which must be the neutral element of the operation min. |
NumType |
min(NumType pathLenOne,
NumType pathLenTwo)
Calculate the minimum distance of a node. |
Method Detail |
---|
NumType add(NumType pathLenOne, NumType pathLenTwo)
pathLenOne
- pathLenTwo
-
NumType min(NumType pathLenOne, NumType pathLenTwo)
pathLenOne
- pathLenTwo
-
NumType infinitePathLen()
NumType emptyPathLen()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |