fr.ifremer.isisfish.simulator.sensitivity.domain
Class ContinuousDomain

java.lang.Object
  extended by fr.ifremer.isisfish.simulator.sensitivity.domain.ContinuousDomain
All Implemented Interfaces:
Domain, Serializable, Cloneable
Direct Known Subclasses:
EquationContinuousDomain, MatrixContinuousDomain

public class ContinuousDomain
extends Object
implements Domain

All the continuous domains can be of 2 different types (min/max or percentage). A min/max domain can take 2 values : minBound and maxBound. A percentage domain got 2 values coefficient and referenceValue that are the basis to calculate the minBound and maxBound values. A continuous domain also got a cardinality, either filled in by the user or the sensitivity method if it manages it. To do sensitivity calculations, you MUST use getCalculatorMinBound(), getCalculatorMaxBound().

Version:
$Revision: 1.0 $ Last update : $Date: 24 févr. 2009 $ By : $Author: chatellier $
Author:
chatellier
See Also:
Serialized Form

Field Summary
protected  Double coefficient
          Coefficient in percent
protected  Object maxBound
          Max value.
protected  Object minBound
          Min value.
protected  boolean percentageType
          Flag to know the type of the domain
protected  Object referenceValue
          Value used to create the factor.
 
Constructor Summary
ContinuousDomain()
          Min/max type constructor.
ContinuousDomain(boolean percentageType)
          Constructor with type.
ContinuousDomain(Object minBound, Object maxBound)
          Constructor with bounds.
 
Method Summary
 void accept(DomainVisitor visitor)
          Accept a new visitor.
 ContinuousDomain clone()
          Clone the domain
 double getCalculatorMaxBound()
          Return the minimum bound for sensitivity calculators.
 double getCalculatorMinBound()
          Return the minimum bound for sensitivity calculators.
 Double getCoefficient()
          Get coefficient.
 Object getMaxBound()
          Return the maximum bound of the domain.
 Object getMinBound()
          Return the minimum bound of the domain.
 Object getReferenceValue()
          Get reference value.
 Object getValueForIdentifier(Object identifier)
          Return value associated to identifier.
 boolean isPercentageType()
          Return factor type (min/max or percentage).
 void setCoefficient(Double coefficient)
          Set coefficient.
 void setMaxBound(Object maxBound)
          Set max value.
 void setMinBound(Object minBound)
          Set the minimum bound of the domain.
 void setPercentageType(boolean percentageType)
          Set domain type (min/max or percentage).
 void setReferenceValue(Object referenceValue)
          Set reference value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minBound

protected Object minBound
Min value.


maxBound

protected Object maxBound
Max value.


referenceValue

protected Object referenceValue
Value used to create the factor.


coefficient

protected Double coefficient
Coefficient in percent


percentageType

protected boolean percentageType
Flag to know the type of the domain

Constructor Detail

ContinuousDomain

public ContinuousDomain()
Min/max type constructor.


ContinuousDomain

public ContinuousDomain(Object minBound,
                        Object maxBound)
Constructor with bounds.

Parameters:
minBound - min bound
maxBound - max bound

ContinuousDomain

public ContinuousDomain(boolean percentageType)
Constructor with type.

Parameters:
percentageType - if true percentage type
Method Detail

isPercentageType

public boolean isPercentageType()
Return factor type (min/max or percentage).

Returns:
true if percentage type

setPercentageType

public void setPercentageType(boolean percentageType)
Set domain type (min/max or percentage).

Parameters:
percentageType - new type value

getMinBound

public Object getMinBound()
Return the minimum bound of the domain. Do not use this value for sensitivity calculation, prefer using getCalculatorMinBound().

Returns:
the minimum bound

getCalculatorMinBound

public double getCalculatorMinBound()
Return the minimum bound for sensitivity calculators. It always returns 0.

Returns:
the minimum bound for sensitivity analysis.

setMinBound

public void setMinBound(Object minBound)
Set the minimum bound of the domain.

Parameters:
minBound - the minimum bound.

getMaxBound

public Object getMaxBound()
Return the maximum bound of the domain. Do not use this value for sensitivity calculation, prefer using getCalculatorMaxBound().

Returns:
the maximum bound

getCalculatorMaxBound

public double getCalculatorMaxBound()
Return the minimum bound for sensitivity calculators. It always returns 1.

Returns:
the maximum bound for sensitivity analysis.

setMaxBound

public void setMaxBound(Object maxBound)
Set max value.

Parameters:
maxBound - the maxBound to set

getCoefficient

public Double getCoefficient()
Get coefficient.

Returns:
the coefficient

setCoefficient

public void setCoefficient(Double coefficient)
Set coefficient.

Parameters:
coefficient - the coefficient to set

getReferenceValue

public Object getReferenceValue()
Get reference value.

Returns:
the reference value

setReferenceValue

public void setReferenceValue(Object referenceValue)
Set reference value.

Parameters:
referenceValue - the reference value.to set

getValueForIdentifier

public Object getValueForIdentifier(Object identifier)
Return value associated to identifier..

Specified by:
getValueForIdentifier in interface Domain
Returns:
found value or null if not found

accept

public void accept(DomainVisitor visitor)
Accept a new visitor.

Specified by:
accept in interface Domain
Parameters:
visitor - the visitor

clone

public ContinuousDomain clone()
Description copied from interface: Domain
Clone the domain

Specified by:
clone in interface Domain
Overrides:
clone in class Object
Returns:
the domain cloned


Copyright © 1999-2012 CodeLutin. All Rights Reserved.