org.sbml.jsbml.validator
public class OverdeterminationValidator extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
OverdeterminationValidator.InnerNode<T extends SBase>
This class represents an inner node in the bipartite graph, e.g., a
varibale or an reaction
|
private static interface |
OverdeterminationValidator.Node<S>
This Interface represents a node in the bipartite graph
|
private class |
OverdeterminationValidator.StartNode<T extends SBase>
This class represents the start node in the bipartite graph
|
private class |
OverdeterminationValidator.TerminalNode<T extends SBase>
This class represents the end node in the bipartite graph
|
Modifier and Type | Field and Description |
---|---|
private OverdeterminationValidator.StartNode<SBase> |
bipartiteGraph
The source node of the bipartite graph, respectively the bipartite graph
|
private java.util.HashMap<SBase,OverdeterminationValidator.Node<SBase>> |
equationHash
HashMap with id -> node for equations
|
private java.util.List<OverdeterminationValidator.Node<SBase>> |
equations
List with nodes representing an equation in the model
|
private java.util.Map<SBase,SBase> |
matching
HashMap representing the current matching with value of the left node ->
value of the right node
|
private Model |
model
The given SBML model
|
private java.util.List<java.util.List<OverdeterminationValidator.Node<SBase>>> |
paths
A list of all paths of a certain length in the graph
|
private java.util.Set<java.lang.String> |
reactants
A set with the ids of all reactants in the model
|
private java.util.List<SBase> |
svariables
A list where the ids of all global species in an MathML expression are
saved temporarily
|
private java.util.HashMap<SBase,OverdeterminationValidator.Node<SBase>> |
variableHash
HashMap with id -> node for variables
|
private java.util.List<OverdeterminationValidator.Node<SBase>> |
variables
List with nodes representing an variable in the model
|
Constructor and Description |
---|
OverdeterminationValidator(Model model)
Creates a new OverdeterminationValidator for the given model
|
Modifier and Type | Method and Description |
---|---|
private void |
augmentMatching()
Improves the matching as far as possible with augmenting paths
|
private void |
augmentPath(int length)
Tries augment every path found in the graph to a new path of the given
length + 2 (a new node at the beginning and the end of the path)
|
private void |
buildGraph()
Build the bipartite graph by reference to SBML specification level 3
version 1 Core
|
private void |
buildMatching()
Build the maximum matching with the greedy algorithm from the Hopcroft
and Karp paper.
|
private void |
findShortestPath(int i,
OverdeterminationValidator.Node<SBase> node,
java.util.List<OverdeterminationValidator.Node<SBase>> path)
Finds all paths of the length i whose nodes are part of the matching.
|
java.util.Map<SBase,SBase> |
getMatching()
Returns the determined matching
|
private void |
getVariables(ListOf<LocalParameter> param,
ASTNode node,
java.util.List<SBase> variables,
int level)
Returns the variables in a MathML object without local parameter
|
private void |
init()
Initializes the Converter
|
boolean |
isOverdetermined()
Returns a boolean that indicates whether the given model is over
determined or not.
|
private void |
updateMatching(java.util.List<OverdeterminationValidator.Node<SBase>> path)
Updates the matching of the model on the basis of the found augmented
path.
|
private java.util.List<OverdeterminationValidator.Node<SBase>> equations
private java.util.List<OverdeterminationValidator.Node<SBase>> variables
private java.util.HashMap<SBase,OverdeterminationValidator.Node<SBase>> variableHash
private java.util.HashMap<SBase,OverdeterminationValidator.Node<SBase>> equationHash
private java.util.Map<SBase,SBase> matching
private OverdeterminationValidator.StartNode<SBase> bipartiteGraph
private java.util.List<SBase> svariables
private java.util.List<java.util.List<OverdeterminationValidator.Node<SBase>>> paths
private java.util.Set<java.lang.String> reactants
private Model model
public OverdeterminationValidator(Model model)
model
- private void augmentMatching()
private void augmentPath(int length)
length
- private void buildGraph()
private void buildMatching()
private void findShortestPath(int i, OverdeterminationValidator.Node<SBase> node, java.util.List<OverdeterminationValidator.Node<SBase>> path)
i
- lengthnode
- next nodepath
- nodes already visited in the pathpublic java.util.Map<SBase,SBase> getMatching()
private void getVariables(ListOf<LocalParameter> param, ASTNode node, java.util.List<SBase> variables, int level)
param
- node
- variables
- private void init()
public boolean isOverdetermined()
private void updateMatching(java.util.List<OverdeterminationValidator.Node<SBase>> path)
path
-