Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
stan
gm
arguments
arg_tolerance.hpp
Go to the documentation of this file.
1
#ifndef STAN__GM__ARGUMENTS__TOLERANCE_HPP
2
#define STAN__GM__ARGUMENTS__TOLERANCE_HPP
3
4
#include <boost/lexical_cast.hpp>
5
6
#include <
stan/gm/arguments/singleton_argument.hpp
>
7
8
namespace
stan {
9
10
namespace
gm {
11
12
class
arg_tolerance
:
public
real_argument
{
13
14
public
:
15
16
arg_tolerance
(
const
char
*
name
,
const
char
*desc,
double
def) :
real_argument
() {
17
_name
=
name
;
18
_description
= desc;
19
_validity
=
"0 <= tol"
;
20
_default
= boost::lexical_cast<std::string>(def);
21
_default_value
= def;
22
_constrained
=
true
;
23
_good_value
= 1.0;
24
_bad_value
= -1.0;
25
_value
=
_default_value
;
26
};
27
28
bool
is_valid
(
double
value
) {
return
value >= 0; }
29
30
};
31
32
}
// gm
33
34
}
// stan
35
36
#endif
stan::gm::arg_tolerance::is_valid
bool is_valid(double value)
Definition:
arg_tolerance.hpp:28
stan::gm::singleton_argument::_validity
std::string _validity
Definition:
singleton_argument.hpp:151
stan::gm::arg_tolerance
Definition:
arg_tolerance.hpp:12
stan::gm::singleton_argument::_value
T _value
Definition:
singleton_argument.hpp:154
stan::gm::valued_argument::_default
std::string _default
Definition:
valued_argument.hpp:47
stan::gm::singleton_argument
Definition:
singleton_argument.hpp:44
stan::gm::singleton_argument::_bad_value
T _bad_value
Definition:
singleton_argument.hpp:160
stan::gm::singleton_argument::value
T value()
Definition:
singleton_argument.hpp:124
stan::gm::argument::_name
std::string _name
Definition:
argument.hpp:76
stan::gm::singleton_argument::_constrained
bool _constrained
Definition:
singleton_argument.hpp:157
stan::gm::argument::name
std::string name() const
Definition:
argument.hpp:26
stan::gm::arg_tolerance::arg_tolerance
arg_tolerance(const char *name, const char *desc, double def)
Definition:
arg_tolerance.hpp:16
stan::gm::singleton_argument::_default_value
T _default_value
Definition:
singleton_argument.hpp:155
singleton_argument.hpp
stan::gm::singleton_argument::_good_value
T _good_value
Definition:
singleton_argument.hpp:159
stan::gm::argument::_description
std::string _description
Definition:
argument.hpp:77
[
Stan Home Page
]
© 2011–2014, Stan Development Team.