// Copyright (C) Stichting Deltares 2016. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// All names, logos, and references to "Deltares" are registered trademarks of
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
namespace Ringtoets.HydraRing.Calculation.Data
{
///
/// Abstract base class for Hydra-Ring variable related data.
///
public abstract class HydraRingVariable2
{
private const double defaultHydraRingValue = 0.0;
private readonly double? defaultHydraRingNullValue = null;
private readonly int variableId;
private readonly double value;
private readonly HydraRingDeviationType deviationType;
///
/// Creates a new instance of the class.
///
/// The Hydra-Ring id corresponding to the variable that is considered.
/// The value in case the variable is deterministic.
/// The deviation type in case the variable is random.
protected HydraRingVariable2(int variableId, double value, HydraRingDeviationType deviationType)
{
this.variableId = variableId;
this.value = value;
this.deviationType = deviationType;
}
///
/// Gets the Hydra-Ring id corresponding to the variable that is considered.
///
public int VariableId
{
get
{
return variableId;
}
}
///
/// Gets the value in case the variable is deterministic.
///
///
/// This property is only relevant when equals .
///
public double Value
{
get
{
return value;
}
}
///
/// Gets the probability distribution of the variable.
///
public abstract HydraRingDistributionType DistributionType { get; }
///
/// Gets the deviation type in case the variable is random.
///
///
/// This property is only relevant when is not equal to .
///
public HydraRingDeviationType DeviationType
{
get
{
return deviationType;
}
}
///
/// Gets the parameter 1 value in case the variable is random.
///
public virtual double Parameter1
{
get
{
return defaultHydraRingValue;
}
}
///
/// Gets the parameter 2 value in case the variable is random.
///
public virtual double? Parameter2
{
get
{
return defaultHydraRingNullValue;
}
}
///
/// Gets the parameter 3 value in case the variable is random.
///
public virtual double? Parameter3
{
get
{
return defaultHydraRingNullValue;
}
}
///
/// Gets the parameter 4 value in case the variable is random.
///
public virtual double? Parameter4
{
get
{
return defaultHydraRingNullValue;
}
}
///
/// Gets the coefficientOfVariation in case the variable is random.
///
public virtual double CoefficientOfVariation
{
get
{
return defaultHydraRingValue;
}
}
}
}