Line data Source code
1 : /* 2 : * Copyright (C) 2020-2024 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 : 24 : namespace mio 25 : { 26 : namespace abm 27 : { 28 6651 : PersonalRandomNumberGenerator::PersonalRandomNumberGenerator(mio::Key<uint64_t> key, PersonId id, 29 6651 : mio::Counter<uint32_t>& counter) 30 6651 : : m_key(key) 31 6651 : , m_person_id(id) 32 13302 : , m_counter(counter) 33 : { 34 6651 : } 35 : 36 6624 : PersonalRandomNumberGenerator::PersonalRandomNumberGenerator(const mio::RandomNumberGenerator& rng, Person& person) 37 6624 : : PersonalRandomNumberGenerator(rng.get_key(), person.get_id(), person.get_rng_counter()) 38 : { 39 6624 : } 40 : 41 : } // namespace abm 42 : } // namespace mio