|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.analysis.AnalysisBase
public class AnalysisBase
This class can be used as a base class for many analysis algorithms (like AutocatalticNetworkDetection,
ShortestPath, ...). It creates adjacency lists for the molecule species (which are
usually not present in Network
implementing classes) and presents methods for a
general breath first search and depth first search, which can be controlled by a NetworkSearchAction
NetworkSearchAction
Constructor Summary | |
---|---|
AnalysisBase(Network network)
Creates an analysis instance. |
Method Summary | |
---|---|
int |
bfs(int[] speciesSource,
int[] reactionSource,
NetworkSearchAction action)
Performs a breath first search starting at the given sources (which means the contents of speciesSource
and reactionSource are the initial content of the queue. |
int |
dfs(int[] speciesSource,
int[] reactionSource,
NetworkSearchAction action)
Performs a depth first search starting at the given sources (which means the contents of speciesSource
and reactionSource are the initial content of the stack. |
int |
search(IntSearchStructure str,
int[] speciesSource,
int[] reactionSource,
NetworkSearchAction action)
Performs a search starting at the given sources (which means the contents of speciesSource
and reactionSource are the initial content of the search structure IntSearchStructure . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnalysisBase(Network network)
Network
is required.
If the network is a ModifierNetwork
, the original network is also
discovered and stored.
network
- the network for analysisMethod Detail |
---|
public int bfs(int[] speciesSource, int[] reactionSource, NetworkSearchAction action)
speciesSource
and reactionSource
are the initial content of the queue. The search is controlled by an NetworkSearchAction
.
speciesSource
- indices of the species to start withreactionSource
- indices of the reactions to start withaction
- controls what species/reactions have to be visited and what to do after discovering/finishing a species/reaction
public int dfs(int[] speciesSource, int[] reactionSource, NetworkSearchAction action)
speciesSource
and reactionSource
are the initial content of the stack. The search is controlled by an NetworkSearchAction
.
speciesSource
- indices of the species to start withreactionSource
- indices of the reactions to start withaction
- controls what species/reactions have to be visited and what to do after discovering/finishing a species/reaction
public int search(IntSearchStructure str, int[] speciesSource, int[] reactionSource, NetworkSearchAction action)
speciesSource
and reactionSource
are the initial content of the search structure IntSearchStructure
.
The search is controlled by an NetworkSearchAction
.
str
- the search structure (fifo/lifo)speciesSource
- indices of the species to start withreactionSource
- indices of the reactions to start withaction
- controls what species/reactions have to be visited and what to do after discovering/finishing a species/reaction
bfs(int[], int[], NetworkSearchAction)
,
dfs(int[], int[], NetworkSearchAction)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |