use of cbit.vcell.math.Variable.Domain in project vcell by virtualcell.
the class XmlReader method getMembraneParticalVariable.
private MembraneParticleVariable getMembraneParticalVariable(Element param) {
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String domainStr = unMangle(param.getAttributeValue(XMLTags.DomainAttrTag));
Domain domain = null;
if (domainStr != null) {
domain = new Domain(domainStr);
}
// -- create new VolVariable object
MembraneParticleVariable var = new MembraneParticleVariable(name, domain);
transcribeComments(param, var);
return var;
}
use of cbit.vcell.math.Variable.Domain in project vcell by virtualcell.
the class XmlReader method getFilamentRegionVariable.
/**
* This method returns a FilamentRegionVariable object from a XML Element.
* Creation date: (5/16/2001 2:56:34 PM)
* @return cbit.vcell.math.FilamentRegionVariable
* @param param org.jdom.Element
*/
private FilamentRegionVariable getFilamentRegionVariable(Element param) {
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String domainStr = unMangle(param.getAttributeValue(XMLTags.DomainAttrTag));
Domain domain = null;
if (domainStr != null) {
domain = new Domain(domainStr);
}
// -- create new FilamentRegionVariable object
FilamentRegionVariable filRegVariable = new FilamentRegionVariable(name, domain);
transcribeComments(param, filRegVariable);
return filRegVariable;
}
use of cbit.vcell.math.Variable.Domain in project vcell by virtualcell.
the class XmlReader method getPointVariable.
private PointVariable getPointVariable(Element param) {
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String domainStr = unMangle(param.getAttributeValue(XMLTags.DomainAttrTag));
Domain domain = null;
if (domainStr != null) {
domain = new Domain(domainStr);
}
// Create new memVariable
PointVariable pointVariable = new PointVariable(name, domain);
transcribeComments(param, pointVariable);
return pointVariable;
}
use of cbit.vcell.math.Variable.Domain in project vcell by virtualcell.
the class XmlReader method getRandomVariable.
private RandomVariable getRandomVariable(Element param) throws XmlParseException {
// get attributes
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
Element element = param.getChild(XMLTags.RandomVariableSeedTag, vcNamespace);
Expression seed = null;
if (element != null) {
seed = unMangleExpression(element.getText());
}
Distribution dist = null;
element = param.getChild(XMLTags.UniformDistributionTag, vcNamespace);
if (element != null) {
dist = getUniformDistribution(element);
}
element = param.getChild(XMLTags.GaussianDistributionTag, vcNamespace);
if (element != null) {
dist = getGaussianDistribution(element);
}
String domainStr = unMangle(param.getAttributeValue(XMLTags.DomainAttrTag));
Domain domain = null;
if (domainStr != null) {
domain = new Domain(domainStr);
}
RandomVariable var = null;
if (param.getName().equals(XMLTags.VolumeRandomVariableTag)) {
var = new VolumeRandomVariable(name, seed, dist, domain);
} else if (param.getName().equals(XMLTags.MembraneRandomVariableTag)) {
var = new MembraneRandomVariable(name, seed, dist, domain);
} else {
throw new XmlParseException(param.getName() + " is not supported!");
}
transcribeComments(param, var);
return var;
}
use of cbit.vcell.math.Variable.Domain in project vcell by virtualcell.
the class XmlReader method getVolVariable.
/**
* This method returns a VolVariable object from a XML Element.
* Creation date: (5/16/2001 2:56:34 PM)
* @return cbit.vcell.math.VolVariable
* @param param org.jdom.Element
*/
private VolVariable getVolVariable(Element param) {
String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
String domainStr = unMangle(param.getAttributeValue(XMLTags.DomainAttrTag));
Domain domain = null;
if (domainStr != null) {
domain = new Domain(domainStr);
}
// -- create new VolVariable object
VolVariable volVariable = new VolVariable(name, domain);
transcribeComments(param, volVariable);
return volVariable;
}
Aggregations