|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.analysis.AnalysisBase
fern.analysis.AutocatalyticNetworkDetection
public class AutocatalyticNetworkDetection
Detects the autocatalytic set of the given network if there is any. An autocatalytic set is defined as a set of species that are produced by a path of reactions, starting at some food molecules and fully catalyzed by members of the autocatalytic set.
The algorithm iterates over two modified breath first searches until none of them can exclude species / reactions any more. The first bfs removes reactions that are not catalyzed in the remaining network (and molecule species that are only produced by that reactions). The second bfs removes species, that do not have a path from each necessary food molecule.
Constructor Summary | |
---|---|
AutocatalyticNetworkDetection(Network network)
Creates the AutocatalyticDetection by using the in the network built in CatalystIterator . |
|
AutocatalyticNetworkDetection(Network network,
CatalystIterator cataIt)
Creates the AutocatalyticDetection by using the second argument as CatalystIterator . |
Method Summary | |
---|---|
void |
annotate(String field,
String value)
Adds annotations to each autocatalytic reaction / species. |
int |
detect()
Performs the detection algorithm. |
cern.colt.bitvector.BitVector |
getAutocatalyticReactions()
Gets the autocatalytic reactions as BitVector . |
cern.colt.bitvector.BitVector |
getAutocatalyticSpecies()
Gets the autocatalytic species as BitVector . |
boolean |
isAutocatalyticReaction(int reaction)
Returns true if the given reaction is autocatalytic. |
boolean |
isAutocatalyticSpecies(int species)
Returns true if the given species is autocatalytic. |
Methods inherited from class fern.analysis.AnalysisBase |
---|
bfs, dfs, search |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutocatalyticNetworkDetection(Network network)
CatalystIterator
.
The network has to implement CatalystIterator
, otherwise an IllegalArgumentException
is thrown.
network
- the network to detect the autocatalytic set inpublic AutocatalyticNetworkDetection(Network network, CatalystIterator cataIt)
CatalystIterator
.
network
- network the network to detect the autocatalytic set incataIt
- a CatalystIterator
for the networkMethod Detail |
---|
public int detect()
getAutocatalyticReactions
,
getAutocatalyticSpecies
,
isAutocatalyticReaction
,
isAutocatalyticSpecies
,
annotate
public cern.colt.bitvector.BitVector getAutocatalyticReactions()
BitVector
. Throws a RuntimeException
if the detection algorithms has not been called.
public cern.colt.bitvector.BitVector getAutocatalyticSpecies()
BitVector
. Throws a RuntimeException
if the detection algorithms has not been called.
public boolean isAutocatalyticReaction(int reaction)
RuntimeException
if the detection algorithms has not been called.
reaction
- the reaction index
public boolean isAutocatalyticSpecies(int species)
RuntimeException
if the detection algorithms has not been called.
species
- the species index
public void annotate(String field, String value)
field
- name of the annotationvalue
- value of the annotation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |