|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.tools.NetworkTools
public class NetworkTools
Contains various helper methods dealing with the Network
interface.
Constructor Summary | |
---|---|
NetworkTools()
|
Method Summary | |
---|---|
static boolean |
areEqual(Network a,
Network b)
Gets whether or not the two given networks contain the same species, the same reactions and yield the same propensities when the amounts of each reactant are respectively 1, 5, 10, 100. |
static void |
dumpMathTree(MathTree tree)
Dumps the MathTree to stdout. |
static void |
dumpMathTree(MathTree tree,
Writer writer)
Dumps the math tree to the given Writer . |
static void |
dumpNetwork(Network net)
Dumps the network to stdout. |
static void |
dumpNetwork(Network net,
Writer writer)
Dumps the network to the given Writer . |
static double |
getConstantBySettingReactantsToStoich(Network net,
int r)
Gets the reaction rate constant by setting the reactant amounts to the stoichiometric coefficient. |
static String[] |
getReactionNames(Network net,
int[] reaction)
Transforms the reaction indices in the given array to the corresponding names. |
static String |
getReactionNameWithAmounts(Network net,
int... reactions)
Gets a string representation of the given reactions and the amounts of each participating species in parentheses. |
static int[] |
getReactionsOf(Network net,
String[] speciesName)
Gets the reaction whose products / reactants are in speciesName |
static int[] |
getSpeciesIndices(Network net,
String[] speciesName)
Transforms the species names in the given array to the corresponding indices. |
static String[] |
getSpeciesNames(Network net,
int[] species)
Transforms the species indices in the given array to the corresponding names. |
static String |
getSpeciesNameWithAmount(Network net,
int... species)
Gets the species names together with its actual amount in parentheses |
static Network |
loadNetwork(File file)
Loads a network from file identifying the type (FernML/SBML). |
static void |
useActualAmountAsInitialAmount(Network net)
Copies the actual amount of the species in the network to its initial amount. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkTools()
Method Detail |
---|
public static double getConstantBySettingReactantsToStoich(Network net, int r)
net
- networkr
- reaction index
public static boolean areEqual(Network a, Network b)
a
- first networkb
- first network
public static Network loadNetwork(File file) throws IOException, org.jdom.JDOMException, FeatureNotSupportedException, ClassNotFoundException
file
- network file
org.jdom.JDOMException
IOException
FeatureNotSupportedException
ClassNotFoundException
public static String getSpeciesNameWithAmount(Network net, int... species)
net
- networkspecies
- species indices
public static String getReactionNameWithAmounts(Network net, int... reactions)
net
- networkreactions
- reaction indices
public static String[] getReactionNames(Network net, int[] reaction)
net
- the networkreaction
- reaction indices
public static String[] getSpeciesNames(Network net, int[] species)
net
- the networkspecies
- species indices
public static int[] getSpeciesIndices(Network net, String[] speciesName)
net
- the networkspeciesName
- species names
public static int[] getReactionsOf(Network net, String[] speciesName)
net
- networkspeciesName
- names of species
public static void dumpNetwork(Network net)
net
- networkpublic static void dumpNetwork(Network net, Writer writer) throws IOException
Writer
.
net
- network
IOException
public static void dumpMathTree(MathTree tree)
tree
- mathtreepublic static void dumpMathTree(MathTree tree, Writer writer) throws IOException
Writer
.
tree
- mathtree
IOException
public static void useActualAmountAsInitialAmount(Network net)
net
- network.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |