Esempio n. 1
0
 public AdressStatistics(int numberOfSamples)
 {
     NumberOfAdressObjects = new DiscreteStatistic(numberOfSamples, "NumberOfAdressObjects");
     GivenMultipleAdressObject_HasSameNinAsPersonObject = new BooleanStatistic(numberOfSamples, "GivenMultipleAdressObject_HasSameNinAsPersonObject");
     HasAdressLine12or3 = new BooleanStatistic(numberOfSamples, "HasAdressLine12or3");
     HasAdressLine1_WhenHasAdressLine12or3 = new BooleanStatistic(numberOfSamples, "HasAdressLine1_WhenHasAdressLine12or3");
     HasAdressLine2_WhenHasAdressLine12or3 = new BooleanStatistic(numberOfSamples, "HasAdressLine2_WhenHasAdressLine12or3");
     HasAdressLine3_WhenHasAdressLine12or3 = new BooleanStatistic(numberOfSamples, "HasAdressLine3_WhenHasAdressLine12or3");
     HasAppartmentNumber     = new BooleanStatistic(numberOfSamples, "HasAppartmentNumber");
     HasBasicStatisticalUnit = new BooleanStatistic(numberOfSamples, "HasBasicStatisticalUnit");
     HasCadastralNumber      = new BooleanStatistic(numberOfSamples, "HasCadastralNumber");
     HasCoAdress             = new BooleanStatistic(numberOfSamples, "HasCoAdress");
     HasConstituency         = new BooleanStatistic(numberOfSamples, "HasConstituency");
     HasCountry                     = new BooleanStatistic(numberOfSamples, "HasCountry");
     IsCurrentAdress                = new BooleanStatistic(numberOfSamples, "IsCurrentAdress");
     HasDateAdrFrom                 = new BooleanStatistic(numberOfSamples, "HasDateAdrFrom");
     HasDatePostalPlace             = new BooleanStatistic(numberOfSamples, "HasDatePostalPlace");
     HasDistrictCodeandDistrictName = new BooleanStatistic(numberOfSamples, "HasDistrictCodeandDistrictName");
     HasHouseLetter                 = new BooleanStatistic(numberOfSamples, "HasHouseLetter");
     HasHouseNumber                 = new BooleanStatistic(numberOfSamples, "HasHouseNumber");
     HasSameNinAsPersonObject       = new BooleanStatistic(numberOfSamples, "HasSameNinAsPersonObject");
     HasPostalAdress                = new BooleanStatistic(numberOfSamples, "HasPostalAdress");
     HasPostalAddressValidFrom      = new BooleanStatistic(numberOfSamples, "HasPostalAddressValidFrom");
     HasPostalCode                  = new BooleanStatistic(numberOfSamples, "HasPostalCode");
     HasPostalCodeGivenIsDead       = new BooleanStatistic(numberOfSamples, "HasPostalCodeGivenIsDead");
     HasPostalPlace                 = new BooleanStatistic(numberOfSamples, "HasPostalPlace");
     PostalType                     = new DiscreteStatistic(numberOfSamples, "PostalType");
     HasPropertyNumber              = new BooleanStatistic(numberOfSamples, "HasPropertyNumber");
     HasSchoolDistrict              = new BooleanStatistic(numberOfSamples, "HasSchoolDistrict");
     HasSt                     = new BooleanStatistic(numberOfSamples, "HasSt");
     HasStreetname             = new BooleanStatistic(numberOfSamples, "HasStreetname");
     HasStreetnumber           = new BooleanStatistic(numberOfSamples, "HasStreetnumber");
     HasXcoordYcoord           = new BooleanStatistic(numberOfSamples, "HasXcoordYcoord");
     GivenHasDnummer_KommuneNr = new DiscreteStringStatistics(numberOfSamples, "GivenHasDnummer_KommuneNr", (int?)null);
 }
 public NameStatistics(int numberOfSamplesToTake)
 {
     HasFirstname = new BooleanStatistic(numberOfSamplesToTake, "HasFirstname");
     GivenHasFirstName_HowManyNames = new DiscreteStatistic(numberOfSamplesToTake, "GivenHasFirstName_HowManyNames");
     HasMiddlename = new BooleanStatistic(numberOfSamplesToTake, "HasMiddlename");
     GivenHasMiddleName_HowManyNames = new DiscreteStatistic(numberOfSamplesToTake, "GivenHasMiddleName_HowManyNames");
     GivenHasHasSirname_HowManyNames = new DiscreteStatistic(numberOfSamplesToTake, "GivenHasHasSirname_HowManyNames");
     HasSirname = new BooleanStatistic(numberOfSamplesToTake, "HasSirname");
     HasMultipleSirname_UseBindestrek = new BooleanStatistic(numberOfSamplesToTake, "HasMultipleSirname_UseBindestrek");
 }
Esempio n. 3
0
        public void Update(string value, DateTime?applicableDate, DateTime?dateOfBirth)
        {
            var applicablevalue = value ?? _novalue;

            if (!DateDifference.ContainsKey(applicablevalue))
            {
                DateDifference[applicablevalue] = new DiscreteStatistic(_numberOfSamples, Name);
            }

            if (!applicableDate.HasValue)
            {
                DateDifference[applicablevalue].Update(ValueToUseWhenNull);
            }

            if (!applicableDate.HasValue || !dateOfBirth.HasValue)
            {
                return;
            }

            var diffPercent = (int)(100.0 * (((double)applicableDate.Value.Year - dateOfBirth.Value.Year) / CommonFunctions.GetAge(dateOfBirth.Value)));

            DateDifference[applicablevalue].Update(diffPercent);
        }
 public SivilstatusStatistics(int numberOfSamplesToTake)
 {
     Sivilstatus_GivenHasSpouse    = new DiscreteStatistic(numberOfSamplesToTake, "Sivilstatus_GivenHasSpouse");
     Sivilstatus_GivenHasNotSpouse = new DiscreteStatistic(numberOfSamplesToTake, "Sivilstatus_GivenHasNotSpouse");
     DateDifference = new DateStatistics(numberOfSamplesToTake, "Sivilstatus_DateDifference");
 }