SUMO - Simulation of Urban MObility
Distribution_Points.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The description of a distribution by a curve
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef Distribution_Points_h
22 #define Distribution_Points_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include "RandomDistributor.h"
35 #include "Distribution.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
48  public Distribution, public RandomDistributor<double> {
49 public:
51  Distribution_Points(const std::string& id);
52 
54  virtual ~Distribution_Points();
55 
63  double sample(MTRand* which = 0) const {
64  return get(which);
65  }
66 
68  double getMax() const;
69 
71  std::string toStr(std::streamsize accuracy) const;
72 };
73 
74 
75 #endif
76 
77 /****************************************************************************/
78 
Represents a generic random distribution.
std::string toStr(std::streamsize accuracy) const
Returns the string representation of this distribution.
virtual ~Distribution_Points()
Destructor.
Distribution_Points(const std::string &id)
Constructor.
double getMax() const
Returns the maximum value of this distribution.
double sample(MTRand *which=0) const
Draw a sample of the distribution.