Class template discrete_interval
boost::icl::discrete_interval
Synopsis
template<typename DomainT,
ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT)>
class discrete_interval {
public:
typedef discrete_interval< DomainT, Compare > type;
typedef DomainT domain_type;
typedef bounded_value< DomainT >::type bounded_domain_type;
discrete_interval();
explicit discrete_interval(const DomainT &);
discrete_interval(const DomainT &, const DomainT &,
interval_bounds = interval_bounds::right_open(),
discrete_interval * = 0);
typedef ICL_COMPARE_DOMAIN(Compare, DomainT);
domain_type lower() const;
domain_type upper() const;
interval_bounds bounds() const;
static discrete_interval open(const DomainT &, const DomainT &);
static discrete_interval right_open(const DomainT &, const DomainT &);
static discrete_interval left_open(const DomainT &, const DomainT &);
static discrete_interval closed(const DomainT &, const DomainT &);
};
Description
discrete_interval
public
construct/copy/destruct
- <
discrete_interval();
>Конструктор по умолчанию; дает пустой интервал<[0,0)
>.
- <
explicitdiscrete_interval(constDomainT&val);
>Конструктор для замкнутого однотонного интервала<[val,val]
>
- <
discrete_interval(constDomainT&low,constDomainT&up,
interval_boundsbounds=interval_bounds::right_open(),
discrete_interval*=0);
>Интервал от<low
>до<up
>с границами<bounds
>
discrete_interval
public member functions
- <
typedefICL_COMPARE_DOMAIN(Compare,DomainT);
>
- <
domain_typelower()const;
>
- <
domain_typeupper()const;
>
- <
interval_boundsbounds()const;
>
discrete_interval
public static functions