|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.fba.comp.AbstractCvComputer<F>
sbrt.kernel.fba.comp.AbstractFluxIntervalComputer<F>
F
- the fluxome type.public abstract class AbstractFluxIntervalComputer<F extends Fluxome>
This abstract class is a skeleton implemenation of FluxIntervalComputer.
Field Summary | |
---|---|
static double |
ZERO_CUTOFF
The default zero cutoff. |
Constructor Summary | |
---|---|
AbstractFluxIntervalComputer(FbaOptimizer<F> computer)
Constructs a new flux interval computer with the default zero cutoff. |
|
AbstractFluxIntervalComputer(FbaOptimizer<F> computer,
double zeroCutoff)
Constructs a new flux interval computer with the provided zero cutoff. |
Method Summary | |
---|---|
protected double |
getBoundedMax(MathExpr<java.lang.String> rxnNameExpr)
Computes the maximum value of the provided objective function. |
protected double |
getBoundedMax(java.lang.String reactionName)
Computes the maximum flux of the reaction with the provided name. |
protected double |
getBoundedMaxWithRxnsMinimized(java.lang.String reactionName,
java.util.Set<java.lang.String> rxnNames)
Computes the maximum flux of the reaction with the provided name while constraining the fluxes of the provided reactions to their minimum. |
protected double |
getBoundedMin(MathExpr<java.lang.String> rxnNameExpr)
Computes the minimum value of the provided objective function. |
protected double |
getBoundedMin(java.lang.String reactionName)
Computes the minimum flux of the reaction with the provided name. |
Interval |
getFluxConstraint(java.lang.String rxnName)
Returns the current flux constraint on the reaction with the provided name. |
java.util.Map<java.lang.String,Interval> |
getFluxConstraints()
Returns all current flux constraints. |
protected Interval |
getInterval(java.lang.String rxn,
Interval fluxConstraint,
double computedMin,
double computedMax)
Returns the provided minimum and maximum fluxes as an interval. |
protected java.util.Map<java.lang.String,Interval> |
getIntervals(java.util.Map<java.lang.String,java.lang.Double> fluxMinima,
java.util.Map<java.lang.String,java.lang.Double> fluxMaxima)
Returns the provided minima and maxima as intervals. |
protected double |
getMaximum(MathExpr<java.lang.String> rxnNameExpr)
Computes the maximum value of the provided objective function. |
protected double |
getMaximum(java.lang.String reactionName)
Computes the maximum flux of the reaction with the provided name. |
protected double |
getMaxWithRxnsMinimized(java.lang.String reactionName,
java.util.Set<java.lang.String> rxnNames)
Computes the maximum flux of the reaction with the provided name while constraining the fluxes of the provided reactions to their minimum. |
protected double |
getMinimum(MathExpr<java.lang.String> rxnNameExpr)
Computes the minimum value of the provided objective function. |
protected double |
getMinimum(java.lang.String reactionName)
Computes the minimum flux of the reaction with the provided name. |
Interval |
getRxnExprConstraint(MathExpr<java.lang.String> rxnNameExp)
Returns the current constraint on the provided expression. |
java.util.Map<MathExpr<java.lang.String>,Interval> |
getRxnExprConstraints()
Returns all current flux expression constraints. |
double |
getTolerance()
Returns the constraint tolerance used by this flux interval computer. |
double |
getZeroCutoff()
Returns the zero cutoff used by this flux interval computer. |
void |
restoreFluxConstraint(java.lang.String reactionName)
Restores the flux constraint for the reaction with the provided name to the value contained in the fluxome. |
void |
restoreFluxConstraints()
Restores the flux constraints for all reactions in the fluxome to those values contained in the fluxome. |
void |
restoreFluxConstraints(java.util.Collection<java.lang.String> reactionNames)
Restores the flux constraints for the provided reaction names to the values contained in the fluxome. |
void |
restoreRxnExprConstraint(MathExpr<java.lang.String> rxnNameExp)
Restores the constraint on the provided flux expression to the value contained in the fluxome. |
void |
restoreRxnExprConstraints()
Restores the constraints on all flux expressions to the values contained in the fluxome. |
void |
restoreRxnExprConstraints(java.util.Collection<? extends MathExpr<java.lang.String>> rxnNameExps)
Restores the constraints on the provided expressions to the values contained in the fluxome. |
void |
setFluxConstraint(java.lang.String reactionName,
Interval c)
Changes the flux constraint of the reaction with the provided name. |
void |
setFluxConstraints(java.util.Map<java.lang.String,Interval> fluxConstraints)
Changes the flux constraints on more than one reaction. |
void |
setRxnExprConstraint(MathExpr<java.lang.String> e,
Interval c)
Changes the constraint on the provided mathematical expression of fluxes. |
void |
setRxnExprConstraints(java.util.Map<? extends MathExpr<java.lang.String>,Interval> constraints)
Changes the constraints on more than one mathematical expression of fluxes. |
Methods inherited from class sbrt.kernel.fba.comp.AbstractCvComputer |
---|
checkFluxConstraint, checkNumber, checkRxnExpr, checkRxnExprConstraint, checkRxnName, checkRxnNames, getFluxome, getRxnExpr, getRxnExpr |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.kernel.fba.comp.FluxIntervalComputer |
---|
getIntervals, getIntervals, getProgress |
Methods inherited from interface sbrt.kernel.fba.comp.FluxCvComputer |
---|
getFluxome |
Field Detail |
---|
public static final double ZERO_CUTOFF
Constructor Detail |
---|
public AbstractFluxIntervalComputer(FbaOptimizer<F> computer)
computer
- the computer with which all optimizations will be
performed.ZERO_CUTOFF
public AbstractFluxIntervalComputer(FbaOptimizer<F> computer, double zeroCutoff)
computer
- the computer with which all optimizations will be
performed.zeroCutoff
- the zero cutoff to be used by this computer.Method Detail |
---|
public double getTolerance()
getTolerance
in interface FluxIntervalComputer<F extends Fluxome>
public double getZeroCutoff()
getZeroCutoff
in interface FluxIntervalComputer<F extends Fluxome>
protected double getMaximum(java.lang.String reactionName)
reactionName
- the name of the reaction whose maximum flux will be
computed.
Double.POSITIVE_INFINITY
if the flux is unbounded.
FbaOptException
- if an optimal solution was not found.
java.lang.IllegalArgumentException
- if the provided string
is not a reaction name of the fluxome used by this flux interval
computer.protected double getMaximum(MathExpr<java.lang.String> rxnNameExpr)
rxnNameExpr
- a mathematical expression
whose variables are reaction names.
Double.POSITIVE_INFINITY
if the problem is unbounded.
FbaOptException
- if an optimal solution was not found.
java.lang.IllegalArgumentException
- if the provided expression
contains a variable that is not a reaction name.
java.lang.NullPointerException
- if the provided expression is null
.protected double getMinimum(java.lang.String reactionName)
reactionName
- the name of the reaction whose minimum flux will be
computed.
Double.NEGATIVE_INFINITY
if the flux is unbounded.
FbaOptException
- if an optimal solution was not found.
java.lang.IllegalArgumentException
- if the provided string
is not a reaction name of the fluxome used by this flux interval
computer.protected double getMinimum(MathExpr<java.lang.String> rxnNameExpr)
rxnNameExpr
- a mathematical expression
whose variables are reaction names.
Double.NEGATIVE_INFINITY
if the problem is unbounded.
FbaOptException
- if an optimal solution was not found.
java.lang.IllegalArgumentException
- if the provided expression
contains a variable that is not a reaction name.
java.lang.NullPointerException
- if the provided expression is null
.protected double getBoundedMin(MathExpr<java.lang.String> rxnNameExpr)
rxnNameExpr
- a mathematical expression of reaction names.
UnboundedVariableException
- if the optimization problem
proves to be unbounded.protected double getBoundedMax(MathExpr<java.lang.String> rxnNameExpr)
rxnNameExpr
- a mathematical expression of reaction names.
UnboundedVariableException
- if the optimization problem
proves to be unbounded.protected double getBoundedMin(java.lang.String reactionName)
reactionName
- the name of a reaction in the fluxome used by this
computer.
UnboundedVariableException
- if the optimization problem
proves to be unbounded.protected double getBoundedMax(java.lang.String reactionName)
reactionName
- the name of a reaction in the fluxome used by this
computer.
UnboundedVariableException
- if the optimization problem
proves to be unbounded.protected double getBoundedMaxWithRxnsMinimized(java.lang.String reactionName, java.util.Set<java.lang.String> rxnNames)
reactionName
- the name of a reaction in the fluxome used by this
computer.rxnNames
- a set of reaction names.
UnboundedVariableException
- if the optimization problem
proves to be unbounded.protected double getMaxWithRxnsMinimized(java.lang.String reactionName, java.util.Set<java.lang.String> rxnNames)
reactionName
- the name of a reaction in the fluxome used by this
computer.rxnNames
- a set of reaction names.
Double.POSITIVE_INFINITY
if the problem is unbounded.protected Interval getInterval(java.lang.String rxn, Interval fluxConstraint, double computedMin, double computedMax)
rxn
- the name of the reaction whose lower and upper flux bounds
have been computed.fluxConstraint
- the current constraint on the flux whose lower and upper
bounds have been computed.computedMin
- the computed lower flux bound.computedMax
- the computed upper flux bound.
ConstraintViolationException
- if either of the computed fluxes lie outside the provided
flux constraint by more than the defined constraint
tolerance.
IllegalBoundsException
- if the provided minimum is greater than the provided maximum
by more than the defined zero cutoff.protected java.util.Map<java.lang.String,Interval> getIntervals(java.util.Map<java.lang.String,java.lang.Double> fluxMinima, java.util.Map<java.lang.String,java.lang.Double> fluxMaxima)
fluxMinima
- the computed flux minima.fluxMaxima
- the computed flux maxima.
public void setFluxConstraint(java.lang.String reactionName, Interval c)
setFluxConstraint
in interface FluxCvComputer<F extends Fluxome>
reactionName
- the name of the reaction whose flux constraint
is to be changed.c
- the new constraint.public void setFluxConstraints(java.util.Map<java.lang.String,Interval> fluxConstraints)
setFluxConstraints
in interface FluxCvComputer<F extends Fluxome>
setFluxConstraints
in class AbstractCvComputer<F extends Fluxome>
fluxConstraints
- reaction names mapped to their respective flux
constraints.public void setRxnExprConstraint(MathExpr<java.lang.String> e, Interval c)
setRxnExprConstraint
in interface FluxCvComputer<F extends Fluxome>
e
- a matheamtical expression of reaction names.c
- the new constraint.public void setRxnExprConstraints(java.util.Map<? extends MathExpr<java.lang.String>,Interval> constraints)
setRxnExprConstraints
in interface FluxCvComputer<F extends Fluxome>
setRxnExprConstraints
in class AbstractCvComputer<F extends Fluxome>
constraints
- mathematical expressions of reaction names mapped
to their new respective constraints.public void restoreFluxConstraint(java.lang.String reactionName)
restoreFluxConstraint
in interface FluxCvComputer<F extends Fluxome>
reactionName
- the name of the reaction whose flux constraint
is to be restored.public void restoreFluxConstraints(java.util.Collection<java.lang.String> reactionNames)
restoreFluxConstraints
in interface FluxCvComputer<F extends Fluxome>
restoreFluxConstraints
in class AbstractCvComputer<F extends Fluxome>
reactionNames
- the reaction names whose flux constraints are to
be restored.public void restoreFluxConstraints()
restoreFluxConstraints
in interface FluxCvComputer<F extends Fluxome>
restoreFluxConstraints
in class AbstractCvComputer<F extends Fluxome>
public void restoreRxnExprConstraint(MathExpr<java.lang.String> rxnNameExp)
restoreRxnExprConstraint
in interface FluxCvComputer<F extends Fluxome>
rxnNameExp
- the expression of reaction names whose contraint
is to be restored.public void restoreRxnExprConstraints(java.util.Collection<? extends MathExpr<java.lang.String>> rxnNameExps)
restoreRxnExprConstraints
in interface FluxCvComputer<F extends Fluxome>
restoreRxnExprConstraints
in class AbstractCvComputer<F extends Fluxome>
rxnNameExps
- the reaction name expressions whose contraints
are to be restored.public void restoreRxnExprConstraints()
restoreRxnExprConstraints
in interface FluxCvComputer<F extends Fluxome>
public java.util.Map<MathExpr<java.lang.String>,Interval> getRxnExprConstraints()
getRxnExprConstraints
in interface FluxCvComputer<F extends Fluxome>
public java.util.Map<java.lang.String,Interval> getFluxConstraints()
getFluxConstraints
in interface FluxCvComputer<F extends Fluxome>
public Interval getRxnExprConstraint(MathExpr<java.lang.String> rxnNameExp)
getRxnExprConstraint
in interface FluxCvComputer<F extends Fluxome>
rxnNameExp
- the mathematical expression of reaction names
whose constraint is to be returned.
public Interval getFluxConstraint(java.lang.String rxnName)
getFluxConstraint
in interface FluxCvComputer<F extends Fluxome>
rxnName
- the name of the reaction whose flux constraint
is to be returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |