public interface NetworkSearchAction
NetworkSearchAction
are able to control/watch searches in
AnalysisBase
. On the one hand they control by using checkReaction
,
checkSpecies
(control if a network node should be visited) and
getAdditionalSpeciesNeighbors
, getAdditionalSpeciesNeighbors
(if there
are other neighbors to visit e.g. catalysts of reactions). On the other hand they can watch the
searches by implementing reactionDiscovered
, reactionFinished
and
speciesDiscovered
, speciesFinished
.Modifier and Type | Interface and Description |
---|---|
static class |
NetworkSearchAction.NeighborType
Defines different types of neighborhoods in a
Network . |
Modifier and Type | Method and Description |
---|---|
boolean |
checkReaction(int reaction,
NetworkSearchAction.NeighborType neighborType)
Gets called, before the reaction is inserted into the search structure.
|
boolean |
checkSpecies(int species,
NetworkSearchAction.NeighborType neighborType)
Gets called, before the species is inserted into the search structure.
|
void |
finished()
Gets called, when the search is done.
|
Iterable<Integer> |
getAdditionalReactionNeighbors(int index)
Returns an iterator for additional neighbors of this species
|
Iterable<Integer> |
getAdditionalSpeciesNeighbors(int index)
Returns an iterator for additional neighbors of this reaction
|
void |
initialize(Network net)
Gets called before anything is inserted into the search structure.
|
void |
reactionDiscovered(int reaction)
Gets called when a reaction is inserted into the search structure.
|
void |
reactionFinished(int reaction)
Gets called when a reaction gets out of the search structure.
|
void |
speciesDiscovered(int species)
Gets called when a species is inserted into the search structure.
|
void |
speciesFinished(int species)
Gets called when a species gets out of the search structure.
|
void reactionDiscovered(int reaction)
reaction
- index of the inserted reactionvoid speciesDiscovered(int species)
species
- index of the inserted speciesvoid reactionFinished(int reaction)
reaction
- index of the reactionsvoid speciesFinished(int species)
species
- index of the speciesboolean checkSpecies(int species, NetworkSearchAction.NeighborType neighborType)
species
- species indexneighborType
- one of the NeighborTypesboolean checkReaction(int reaction, NetworkSearchAction.NeighborType neighborType)
reaction
- reaction indexneighborType
- one of the NeighborTypesvoid initialize(Network net)
net
- the network where the search is going to be performedvoid finished()
Iterable<Integer> getAdditionalSpeciesNeighbors(int index)
index
- reaction indexCopyright © 2007–2021. All rights reserved.