LCOV - code coverage report
Current view: top level - models/abm - personal_rng.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 9 100.0 %
Date: 2025-02-17 13:46:44 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* 
       2             : * Copyright (C) 2020-2025 MEmilio
       3             : *
       4             : * Authors: Daniel Abele, Elisabeth Kluth, David Kerkmann, Khoa Nguyen, Rene Schmieding
       5             : *
       6             : * Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de>
       7             : *
       8             : * Licensed under the Apache License, Version 2.0 (the "License");
       9             : * you may not use this file except in compliance with the License.
      10             : * You may obtain a copy of the License at
      11             : *
      12             : *     http://www.apache.org/licenses/LICENSE-2.0
      13             : *
      14             : * Unless required by applicable law or agreed to in writing, software
      15             : * distributed under the License is distributed on an "AS IS" BASIS,
      16             : * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      17             : * See the License for the specific language governing permissions and
      18             : * limitations under the License.
      19             : */
      20             : 
      21             : #include "abm/personal_rng.h"
      22             : #include "abm/person.h"
      23             : #include "abm/person_id.h"
      24             : #include <cstdint>
      25             : 
      26             : namespace mio
      27             : {
      28             : namespace abm
      29             : {
      30        6826 : PersonalRandomNumberGenerator::PersonalRandomNumberGenerator(mio::Key<uint64_t> key, uint32_t index,
      31        6826 :                                                              mio::Counter<uint32_t>& counter)
      32        6826 :     : m_key(key)
      33        6826 :     , m_person_index(index)
      34       13652 :     , m_counter(counter)
      35             : {
      36        6826 : }
      37             : 
      38        6790 : PersonalRandomNumberGenerator::PersonalRandomNumberGenerator(Person& person)
      39        6790 :     : PersonalRandomNumberGenerator(person.get_rng_key(), person.get_rng_index(), person.get_rng_counter())
      40             : {
      41        6790 : }
      42             : 
      43             : } // namespace abm
      44             : } // namespace mio

Generated by: LCOV version 1.14