|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.ohf.stem.core.graph.impl.LabelValueImpl
org.eclipse.ohf.stem.diseasemodels.standard.impl.DiseaseModelLabelValueImpl
org.eclipse.ohf.stem.diseasemodels.standard.impl.StandardDiseaseModelLabelValueImpl
org.eclipse.ohf.stem.diseasemodels.standard.impl.SILabelValueImpl
org.eclipse.ohf.stem.diseasemodels.standard.impl.SIRLabelValueImpl
org.eclipse.ohf.stem.diseasemodels.standard.impl.SEIRLabelValueImpl
public class SEIRLabelValueImpl
An implementation of the model object 'SEIR Label Value'.
The following features are implemented:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter> |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
org.eclipse.emf.ecore.InternalEObject.EStore |
Field Summary |
---|
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
ELAST_EOBJECT_FLAG |
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
EOPPOSITE_FEATURE_BASE |
Constructor Summary | |
---|---|
SEIRLabelValueImpl(double s,
double e,
double iR,
double iF,
double r,
double births,
double deaths,
double diseaseDeaths)
This is used to create instances for testing purposes. |
Method Summary | |
---|---|
DiseaseModelLabelValue |
add(DiseaseModelLabelValue value)
|
StandardDiseaseModelLabelValue |
convertToSourceStates()
|
java.lang.Object |
eGet(int featureID,
boolean resolve,
boolean coreType)
|
boolean |
eIsSet(int featureID)
|
void |
eSet(int featureID,
java.lang.Object newValue)
|
void |
eUnset(int featureID)
|
double |
getE()
|
double |
getPopulationCount()
|
void |
reset()
|
boolean |
sane()
This method is for ongoing development and testing purposes. |
DiseaseModelLabelValue |
scale(double scaleFactor)
|
DiseaseModelLabelValue |
set(DiseaseModelLabelValue value)
|
void |
setE(double newE)
|
DiseaseModelLabelValue |
sub(DiseaseModelLabelValue value)
|
java.lang.String |
toString()
|
void |
zeroOutPopulationCount()
|
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.SIRLabelValueImpl |
---|
getR, setR |
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.SILabelValueImpl |
---|
getI, getIF, getIR, setIF, setIR |
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.StandardDiseaseModelLabelValueImpl |
---|
getS, setS |
Methods inherited from class org.eclipse.ohf.stem.diseasemodels.standard.impl.DiseaseModelLabelValueImpl |
---|
getBirths, getDeaths, getDiseaseDeaths, setBirths, setDeaths, setDiseaseDeaths |
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
---|
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI |
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
---|
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset |
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
---|
eNotificationRequired, eNotify |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.SIRLabelValue |
---|
getR, setR |
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.SILabelValue |
---|
getI, getIF, getIR, setIF, setIR |
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.StandardDiseaseModelLabelValue |
---|
getS, setS |
Methods inherited from interface org.eclipse.ohf.stem.diseasemodels.standard.DiseaseModelLabelValue |
---|
getBirths, getDeaths, getDiseaseDeaths, setBirths, setDeaths, setDiseaseDeaths |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
---|
eNotificationRequired |
Constructor Detail |
---|
public SEIRLabelValueImpl(double s, double e, double iR, double iF, double r, double births, double deaths, double diseaseDeaths)
s
- the number of susceptible population memberse
- the number of exposed population membersiR
- the number of recovering infectious population membersiF
- the number of fatally infectious population membersr
- the number of recovered population membersbirths
- the number of births that have occured in the populationdeaths
- the total number of deaths that have occured in the populationdiseaseDeaths
- the number of deaths due to the disease that have occured in
the population
Method Detail |
---|
public double getE()
getE
in interface SEIRLabelValue
public void setE(double newE)
setE
in interface SEIRLabelValue
newE
- SEIRLabelValue.getE()
public StandardDiseaseModelLabelValue convertToSourceStates()
StandardDiseaseModelLabelValueImpl
convertToSourceStates
in interface StandardDiseaseModelLabelValue
convertToSourceStates
in class SIRLabelValueImpl
SILabelValueImpl.convertToSourceStates()
public double getPopulationCount()
DiseaseModelLabelValueImpl
getPopulationCount
in interface DiseaseModelLabelValue
getPopulationCount
in class SIRLabelValueImpl
SIRLabelValueImpl.getPopulationCount()
public void zeroOutPopulationCount()
DiseaseModelLabelValueImpl
zeroOutPopulationCount
in interface DiseaseModelLabelValue
zeroOutPopulationCount
in class SIRLabelValueImpl
public DiseaseModelLabelValue set(DiseaseModelLabelValue value)
DiseaseModelLabelValueImpl
set
in interface DiseaseModelLabelValue
set
in class SIRLabelValueImpl
value
- the new value for this disease model value
SIRLabelValueImpl.set(org.eclipse.ohf.stem.diseasemodels.standard.DiseaseModelLabelValue)
public DiseaseModelLabelValue add(DiseaseModelLabelValue value)
DiseaseModelLabelValueImpl
add
in interface DiseaseModelLabelValue
add
in class SIRLabelValueImpl
value
- the value to be added to this disease model value
SIRLabelValueImpl.add(org.eclipse.ohf.stem.diseasemodels.standard.DiseaseModelLabelValue)
public DiseaseModelLabelValue sub(DiseaseModelLabelValue value)
DiseaseModelLabelValueImpl
sub
in interface DiseaseModelLabelValue
sub
in class SIRLabelValueImpl
value
- the value to be added to this disease model value
SIRLabelValueImpl.sub(org.eclipse.ohf.stem.diseasemodels.standard.DiseaseModelLabelValue)
public DiseaseModelLabelValue scale(double scaleFactor)
DiseaseModelLabelValueImpl
scale
in interface DiseaseModelLabelValue
scale
in class SIRLabelValueImpl
scaleFactor
- the mulitplier
public void reset()
LabelValueImpl
reset
in interface LabelValue
reset
in class SIRLabelValueImpl
SIRLabelValueImpl.reset()
public boolean sane()
SanityChecker
This method is intended to be overridden by extending sub-classes. These
classes should first call the method in the super class (i.e.,
super.sane()
) to ensure that the super class is "ok" and
then it can issue its own assertions.
void sane() {
boolean retValue = super.sane();
// If foo references bar, then bar should reference foo!
retValue = retValue && (foo.a == bar && bar.a == foo);
assert(retValue);
return retValue;
} // sane
The idiom retValue = retValue && <boolean test>
followed by an assertion of the value of retValue
is a
typical pattern. If followed, then once a problem is detected, an
assertion will be thrown, or the rest of the tests will be skipped and
the value of false
returned. By having sane
return a value rather than simply relying upon the assert
keyword sanity testing can occur even if assertions are not enabled.
The sane
method should be called when the instance is
known to be "stable" so the consistency checks should complete with no
problems (if all is well).
sane
in interface SanityChecker
sane
in class SIRLabelValueImpl
SIRLabelValueImpl.sane()
public java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface org.eclipse.emf.ecore.InternalEObject
eGet
in class SIRLabelValueImpl
featureID
- resolve
- coreType
-
public void eSet(int featureID, java.lang.Object newValue)
eSet
in interface org.eclipse.emf.ecore.InternalEObject
eSet
in class SIRLabelValueImpl
featureID
- newValue
- public void eUnset(int featureID)
eUnset
in interface org.eclipse.emf.ecore.InternalEObject
eUnset
in class SIRLabelValueImpl
featureID
- public boolean eIsSet(int featureID)
eIsSet
in interface org.eclipse.emf.ecore.InternalEObject
eIsSet
in class SIRLabelValueImpl
featureID
-
public java.lang.String toString()
toString
in class SIRLabelValueImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |