// 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. using Ringtoets.HydraRing.Calculation.Types; namespace Ringtoets.HydraRing.Calculation.Data { /// /// Container for Hydra-Ring variable related data. /// internal abstract class HydraRingVariable { private readonly int variableId; private readonly HydraRingDistributionType distributionType; private readonly double value; private readonly HydraRingDeviationType deviationType; private readonly double mean; private readonly double variability; private readonly double shift; private readonly double correlationLength; /// /// Creates a new instance of the class. /// /// The Hydra-Ring id corresponding to the variable that is considered. /// The probability distribution of the variable. /// The value in case the variable is deterministic. /// The deviation type in case the variable is random. /// The mean value in case the variable is random. /// The variability in case the variable is random. /// The shift in case the variable is random. /// The correlation length. protected HydraRingVariable(int variableId, HydraRingDistributionType distributionType, double value, HydraRingDeviationType deviationType, double mean, double variability, double shift, double correlationLength) { this.variableId = variableId; this.distributionType = distributionType; this.value = value; this.deviationType = deviationType; this.mean = mean; this.variability = variability; this.shift = shift; this.correlationLength = correlationLength; } /// /// Gets the Hydra-Ring id corresponding to the variable that is considered. /// public int VariableId { get { return variableId; } } /// /// Gets the probability distribution of the variable. /// public HydraRingDistributionType DistributionType { get { return distributionType; } } /// /// Gets the value in case the variable is deterministic. /// /// /// This property is only relevant when equals . /// public double Value { get { return value; } } /// /// 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 mean value in case the variable is random. /// /// /// This property is only relevant when is not equal to . /// public double Mean { get { return mean; } } /// /// Gets the variablity in case the variable is random. /// /// /// The value represents a standard deviation in case the equals . /// The value represents a variation coefficient in case the equals . /// public double Variability { get { return variability; } } /// /// Gets the shift in case the variable is random. /// /// /// This property is only relevant when equals . /// public double Shift { get { return shift; } } /// /// Gets the correlation length. /// public double CorrelationLength { get { return correlationLength; } } } }