bpp-phyl3  3.0.0
RewardMapping.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_PHYL_MAPPING_REWARDMAPPING_H
6 #define BPP_PHYL_MAPPING_REWARDMAPPING_H
7 
8 #include <Bpp/Clonable.h>
9 
10 #include "Mapping.h"
11 
12 // From the STL:
13 #include <vector>
14 #include <memory>
15 
16 namespace bpp
17 {
26  public virtual MappingInterface
27 {
28 public:
31 
32  RewardMappingInterface* clone() const override = 0;
33 
34 public:
35  virtual double& operator()(uint branchId, size_t siteIndex) = 0;
36  virtual double operator()(uint branchId, size_t siteIndex) const = 0;
37 };
38 
39 
47  public virtual RewardMappingInterface,
48  public AbstractMapping
49 {
50 public:
52 
54  AbstractMapping(absm) {}
55 
56  AbstractRewardMapping* clone() const override = 0;
57 
59  {
61  return *this;
62  }
63 
65 };
66 } // end of namespace bpp.
67 #endif // BPP_PHYL_MAPPING_REWARDMAPPING_H
Partial implementation of the mapping interface.
Definition: Mapping.h:79
AbstractMapping & operator=(const AbstractMapping &absm)=default
Partial implementation of the substitution mapping interface.
Definition: RewardMapping.h:49
AbstractRewardMapping(const AbstractRewardMapping &absm)
Definition: RewardMapping.h:53
AbstractRewardMapping & operator=(const AbstractRewardMapping &absm)
Definition: RewardMapping.h:58
AbstractRewardMapping * clone() const override=0
General interface for storing mapping data.
Definition: Mapping.h:26
General interface for storing reward mapping data.
Definition: RewardMapping.h:27
RewardMappingInterface * clone() const override=0
virtual double operator()(uint branchId, size_t siteIndex) const =0
virtual double & operator()(uint branchId, size_t siteIndex)=0
Defines the basic types of data flow nodes.