aGrUM
3.2.0
a C++ library for (probabilistic) graphical models
Toggle main menu visibility
taxiSimulator_inl.h
Go to the documentation of this file.
1
/****************************************************************************
2
* This file is part of the aGrUM/pyAgrum library. *
3
* *
4
* Copyright (c) 2005-2026 by *
5
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
6
* - Christophe GONZALES(_at_AMU) *
7
* *
8
* The aGrUM/pyAgrum library is free software; you can redistribute it *
9
* and/or modify it under the terms of either : *
10
* *
11
* - the GNU Lesser General Public License as published by *
12
* the Free Software Foundation, either version 3 of the License, *
13
* or (at your option) any later version, *
14
* - the MIT license (MIT), *
15
* - or both in dual license, as here. *
16
* *
17
* (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html) *
18
* *
19
* This aGrUM/pyAgrum library is distributed in the hope that it will be *
20
* useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
21
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
22
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
23
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
24
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
25
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
26
* OTHER DEALINGS IN THE SOFTWARE. *
27
* *
28
* See LICENCES for more details. *
29
* *
30
* SPDX-FileCopyrightText: Copyright 2005-2026 *
31
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
32
* - Christophe GONZALES(_at_AMU) *
33
* SPDX-License-Identifier: LGPL-3.0-or-later OR MIT *
34
* *
35
* Contact : info_at_agrum_dot_org *
36
* homepage : http://agrum.gitlab.io *
37
* gitlab : https://gitlab.com/agrumery/agrum *
38
* *
39
****************************************************************************/
40
41
#pragma once
42
43
#include <
agrum/FMDP/simulation/taxiSimulator.h
>
44
45
namespace
gum
{
46
47
48
INLINE
const
DiscreteVariable
*
TaxiSimulator::primeVar
(
const
DiscreteVariable
* mainVar) {
49
return
_primeMap_
.
second
(mainVar);
50
}
51
52
INLINE
SequenceIteratorSafe< const DiscreteVariable* >
TaxiSimulator::beginVariables
() {
53
return
_taxiVars_
.beginSafe();
54
}
55
56
INLINE
SequenceIteratorSafe< const DiscreteVariable* >
TaxiSimulator::endVariables
() {
57
return
_taxiVars_
.endSafe();
58
}
59
60
INLINE
const
std::string&
TaxiSimulator::actionName
(
Idx
actionId) {
61
return
*
_actionMap_
[actionId];
62
}
63
64
INLINE
SequenceIteratorSafe< Idx >
TaxiSimulator::beginActions
() {
65
return
_taxiActions_
.
beginSafe
();
66
}
67
68
INLINE
SequenceIteratorSafe< Idx >
TaxiSimulator::endActions
() {
return
_taxiActions_
.
endSafe
(); }
69
70
}
// namespace gum
gum::BijectionImplementation< T1, T2, std::is_scalar< T1 >::value &&std::is_scalar< T2 >::value >::second
const T2 & second(const T1 &first) const
gum::DiscreteVariable
Base class for discrete random variable.
Definition
discreteVariable.h:80
gum::SequenceImplementation< Key, std::is_scalar< Key >::value >::beginSafe
iterator_safe beginSafe() const
gum::SequenceImplementation< Key, std::is_scalar< Key >::value >::endSafe
const iterator_safe & endSafe() const noexcept
gum::SequenceIteratorSafe
Safe iterators for Sequence.
Definition
sequence.h:1148
gum::TaxiSimulator::actionName
const std::string & actionName(Idx actionId) override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:60
gum::TaxiSimulator::_taxiActions_
Sequence< Idx > _taxiActions_
Actions.
Definition
taxiSimulator.h:200
gum::TaxiSimulator::_primeMap_
Bijection< const DiscreteVariable *, const DiscreteVariable * > _primeMap_
Definition
taxiSimulator.h:192
gum::TaxiSimulator::_taxiVars_
Sequence< const DiscreteVariable * > _taxiVars_
Variables data structures.
Definition
taxiSimulator.h:191
gum::TaxiSimulator::primeVar
const DiscreteVariable * primeVar(const DiscreteVariable *mainVar) override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:48
gum::TaxiSimulator::beginActions
SequenceIteratorSafe< Idx > beginActions() override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:64
gum::TaxiSimulator::beginVariables
SequenceIteratorSafe< const DiscreteVariable * > beginVariables() override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:52
gum::TaxiSimulator::endVariables
SequenceIteratorSafe< const DiscreteVariable * > endVariables() override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:56
gum::TaxiSimulator::_actionMap_
HashTable< Idx, std::string * > _actionMap_
Definition
taxiSimulator.h:201
gum::TaxiSimulator::endActions
SequenceIteratorSafe< Idx > endActions() override
Iteration over the variables of the simulated probleme.
Definition
taxiSimulator_inl.h:68
gum::Idx
Size Idx
Type for indexes.
Definition
types.h:79
gum
gum is the global namespace for all aGrUM entities
Definition
agrum.h:46
taxiSimulator.h
Class for simulating a markov decision process.
aGrUM
3.2.0
© PHW&CG&others - 2022
DoXyGeN 1.18.0