fern.network.modification
Class MultiplierNetwork

java.lang.Object
  extended by fern.network.modification.ModifierNetwork
      extended by fern.network.modification.MultiplierNetwork
All Implemented Interfaces:
Network

public class MultiplierNetwork
extends ModifierNetwork

Multiplies the whole network by a factor. Each species and each reaction is copied factor times and connected corresponding to the original network. As proposed by ModifierNetwork, the reactions are not copied but the indices are redirected. The reactions and species are relabelled to the pattern oldid_nr, where oldid is the original id of the reaction/species and nr is the zero based number of the copy.

Author:
Florian Erhard

Constructor Summary
MultiplierNetwork(Network originalNet, int factor)
          Creates a new network from an original network and virtually multiplies each reaction and species factor times.
 
Method Summary
 AmountManager getAmountManager()
          Gets the AmountManager for the modified network.
 AnnotationManager getAnnotationManager()
          Gets the AnnotationManager for the modified network.
 int getNumReactions()
          Gets the number of reactions in the modified network (which is 2*number of reaction in the original network).
 int[] getProducts(int reaction)
          Gets the products of a reaction
 PropensityCalculator getPropensityCalculator()
          Gets the PropensityCalculator for the modified network.
 int[] getReactants(int reaction)
          Gets the reactants of a reaction
 String getReactionName(int index)
          Gets a string representation of the reaction in the modified network.
 
Methods inherited from class fern.network.modification.ModifierNetwork
getInitialAmount, getName, getNumSpecies, getOriginalNetwork, getParentNetwork, getSpeciesByName, getSpeciesName, setInitialAmount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiplierNetwork

public MultiplierNetwork(Network originalNet,
                         int factor)
Creates a new network from an original network and virtually multiplies each reaction and species factor times.

Parameters:
originalNet - the original network
reversiblePropensityCalculator - the PropensityCalculator for the reverse reactions
Method Detail

getAmountManager

public AmountManager getAmountManager()
Gets the AmountManager for the modified network.

Specified by:
getAmountManager in interface Network
Overrides:
getAmountManager in class ModifierNetwork
Returns:
AmountManager for the modified network

getNumReactions

public int getNumReactions()
Gets the number of reactions in the modified network (which is 2*number of reaction in the original network).

Specified by:
getNumReactions in interface Network
Overrides:
getNumReactions in class ModifierNetwork
Returns:
number of reactions in the modified network

getProducts

public int[] getProducts(int reaction)
Gets the products of a reaction

Specified by:
getProducts in interface Network
Overrides:
getProducts in class ModifierNetwork
Parameters:
reaction - index of the reaction
Returns:
indices of the products

getReactants

public int[] getReactants(int reaction)
Gets the reactants of a reaction

Specified by:
getReactants in interface Network
Overrides:
getReactants in class ModifierNetwork
Parameters:
reaction - index of the reaction
Returns:
indices of the reactants

getPropensityCalculator

public PropensityCalculator getPropensityCalculator()
Gets the PropensityCalculator for the modified network. If the original PropensityCalculator and the one for the reverse reactions is a AbstractKineticConstantPropensityCalculator, an AbstractKineticConstantPropensityCalculator is returned.

Specified by:
getPropensityCalculator in interface Network
Overrides:
getPropensityCalculator in class ModifierNetwork
Returns:
the PropensityCalculator for the modified network

getAnnotationManager

public AnnotationManager getAnnotationManager()
Gets the AnnotationManager for the modified network.

Specified by:
getAnnotationManager in interface Network
Overrides:
getAnnotationManager in class ModifierNetwork
Returns:
AnnotationManager for the modified network.

getReactionName

public String getReactionName(int index)
Gets a string representation of the reaction in the modified network.

Specified by:
getReactionName in interface Network
Overrides:
getReactionName in class ModifierNetwork
Parameters:
index - index of the reaction
Returns:
string representation of the reaction