|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprioritizer.Pairwise.Graph
Defines a graph used for estimating missig comparisons when using incomplete pairwise prioritization
Nested Class Summary | |
(package private) class |
Pairwise.Graph.Arc
Defines an arc in the graph |
(package private) class |
Pairwise.Graph.Node
Defines a node in the graph |
(package private) class |
Pairwise.Graph.PathValue
Represents the value of a path in the graph |
Field Summary | |
private int |
maxPathsFound
|
private int |
nbrOfPaths
|
private Pairwise.Graph.Node[] |
nodes
|
private Pairwise.Graph.PathValue |
pathProduct
|
private boolean |
random
|
Constructor Summary | |
Pairwise.Graph(RequirementList rList)
Constructs the nodes for the graph in which each node represents a requirement |
Method Summary | |
void |
addArc(Requirement from,
Requirement to,
double value)
Adds a comparison represented as a directed arc in the graph |
double |
calculateGeometricMean(Pairwise.Graph.Node from,
Pairwise.Graph.Node to)
Calculates and returns the geometric mean of a all possible paths between the specified nodes |
double |
calculateRandomGeometricMean(Pairwise.Graph.Node from,
Pairwise.Graph.Node to)
Calculates and returns the geometric mean of a random sample of paths between the specified nodes |
private void |
checkForMethodChange()
Checks if the threshold value has been reached where it becomes inefficient to use all possible paths when estimating a missing path. |
double |
getArcValue(Requirement from,
Requirement to)
Gets the value of the comparison (arc) between the specified requirements (nodes) |
private void |
rec(Pairwise.Graph.Node node,
Requirement to,
double value)
Recursive algorithm used to calculate the pathproduct for all possible paths from an outgoing arc from the start node. |
private void |
recRandom(Pairwise.Graph.Node node,
Requirement to,
double value)
Recursive algorithm used to calculate the pathproduct for a randomized path from a random outgoing arc from the start node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Pairwise.Graph.Node[] nodes
private int nbrOfPaths
private int maxPathsFound
private Pairwise.Graph.PathValue pathProduct
private boolean random
Constructor Detail |
public Pairwise.Graph(RequirementList rList)
rList
- the list of requirements to create nodes forMethod Detail |
private void checkForMethodChange()
public void addArc(Requirement from, Requirement to, double value)
from
- the requirement (node) to add the arc fromto
- the requirement (node) to add the arc tovalue
- the value of the comparison (arc) set by the userpublic double getArcValue(Requirement from, Requirement to)
from
- the from-requirement (node)to
- the to-requirement (node)
public double calculateRandomGeometricMean(Pairwise.Graph.Node from, Pairwise.Graph.Node to)
from
- the from-nodeto
- the to-node
public double calculateGeometricMean(Pairwise.Graph.Node from, Pairwise.Graph.Node to)
from
- the from-nodeto
- the to-node
private void recRandom(Pairwise.Graph.Node node, Requirement to, double value)
node
- the start node in the recursive callto
- the requirement (node) that is to be foundvalue
- the value of the path so farprivate void rec(Pairwise.Graph.Node node, Requirement to, double value)
node
- the start node in the recursive callto
- the requirement (node) that is to be foundvalue
- the value of the path so far
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |