bpp-core3  3.0.0
MultipleDiscreteDistribution.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_NUMERIC_PROB_MULTIPLEDISCRETEDISTRIBUTION_H
6 #define BPP_NUMERIC_PROB_MULTIPLEDISCRETEDISTRIBUTION_H
7 
8 
9 #include "../../Exceptions.h"
10 #include "../../Io/OutputStream.h"
11 #include "../ParameterAliasable.h"
12 #include "../VectorTools.h"
13 
14 namespace bpp
15 {
34  public virtual ParameterAliasable
35 {
36 public:
38 
40 
42 
43 public:
47  virtual size_t getNumberOfCategories() const = 0;
48 
56  virtual Vdouble getValueCategory(Vdouble& Vvalue) const = 0;
57 
62  virtual double getProbability(Vdouble& category) const = 0;
63 
64 public:
73  virtual Vdouble rand() const = 0;
74 
83  virtual Vdouble randC() const = 0;
84 
97  // virtual bool adaptToConstraint(const std::vector<Constraint&>& vc, bool f=true) = 0;
98 
104  // virtual void print(OutputStream& out) const = 0;
105 };
106 } // end of namespace bpp.
107 #endif // BPP_NUMERIC_PROB_MULTIPLEDISCRETEDISTRIBUTION_H
Interface for multiple discrete distribution objects.
Extend the Parametrizable interface with support for parameter aliases.
virtual Vdouble getValueCategory(Vdouble &Vvalue) const =0
virtual size_t getNumberOfCategories() const =0
virtual double getProbability(Vdouble &category) const =0
std::vector< double > Vdouble
Definition: VectorTools.h:34
MultipleDiscreteDistribution * clone() const =0
Create a copy of this object and send a pointer to it.
virtual Vdouble rand() const =0
Draw a random vector from this distribution.
virtual Vdouble randC() const =0
Draw a random vector from the continuous version of this distribution, if it exists.