xo-process: prefer xo::bp spelling to xo::ref::brw
This commit is contained in:
parent
f774e6446f
commit
eccc50d2b9
3 changed files with 20 additions and 20 deletions
|
|
@ -27,14 +27,14 @@ namespace xo {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static rp<ExpProcess> make(double scale,
|
static rp<ExpProcess> make(double scale,
|
||||||
ref::brw<StochasticProcess<double>> exp_proc) {
|
bp<StochasticProcess<double>> exp_proc) {
|
||||||
return new ExpProcess(scale, exp_proc);
|
return new ExpProcess(scale, exp_proc);
|
||||||
} /*make*/
|
} /*make*/
|
||||||
|
|
||||||
/* reflect ExpProcess object representation */
|
/* reflect ExpProcess object representation */
|
||||||
static void reflect_self();
|
static void reflect_self();
|
||||||
|
|
||||||
ref::brw<StochasticProcess<double>> exponent_process() const { return exponent_process_.borrow(); }
|
bp<StochasticProcess<double>> exponent_process() const { return exponent_process_.borrow(); }
|
||||||
|
|
||||||
// ----- inherited from StochasticProcess<...> -----
|
// ----- inherited from StochasticProcess<...> -----
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ namespace xo {
|
||||||
virtual TaggedRcptr self_tp() override;
|
virtual TaggedRcptr self_tp() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ExpProcess(double scale, ref::brw<StochasticProcess> exp_proc)
|
ExpProcess(double scale, bp<StochasticProcess> exp_proc)
|
||||||
: scale_(scale),
|
: scale_(scale),
|
||||||
exponent_process_{exp_proc.get()} {
|
exponent_process_{exp_proc.get()} {
|
||||||
ExpProcess::reflect_self();
|
ExpProcess::reflect_self();
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,18 @@
|
||||||
namespace xo {
|
namespace xo {
|
||||||
namespace process {
|
namespace process {
|
||||||
|
|
||||||
// realization of a stochastic process.
|
/** realization of a stochastic process.
|
||||||
// interface designed to allow for lazy evaluation.
|
interface designed to allow for lazy evaluation.
|
||||||
//
|
|
||||||
// since a process connects a family of random variables,
|
since a process connects a family of random variables,
|
||||||
// a single process can have a generally unbounded number of distinct realizations.
|
a single process can have a generally unbounded number of distinct realizations.
|
||||||
//
|
|
||||||
// implications:
|
implications:
|
||||||
// - can only realize (or observe) a finite set of instants.
|
- can only realize (or observe) a finite set of instants.
|
||||||
// - given process evolves continuously,
|
- given process evolves continuously,
|
||||||
// want ability to revisit intervals that may already contain some realized instants.
|
want ability to revisit intervals that may already contain some realized instants.
|
||||||
// - achieve this by allowing for caching behavior
|
- achieve this by allowing for caching behavior
|
||||||
//
|
**/
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Realization : public ref::Refcount {
|
class Realization : public ref::Refcount {
|
||||||
public:
|
public:
|
||||||
|
|
@ -33,11 +33,11 @@ namespace xo {
|
||||||
using KnownRange = decltype(std::views::all(KnownMap()));
|
using KnownRange = decltype(std::views::all(KnownMap()));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static rp<Realization> make(ref::brw<StochasticProcess<T>> p) {
|
static rp<Realization> make(bp<StochasticProcess<T>> p) {
|
||||||
return new Realization(p);
|
return new Realization(p);
|
||||||
} /*make*/
|
} /*make*/
|
||||||
|
|
||||||
ref::brw<StochasticProcess<T>> process() const { return process_; }
|
bp<StochasticProcess<T>> process() const { return process_; }
|
||||||
|
|
||||||
utc_nanos t0() const { return process_->t0(); }
|
utc_nanos t0() const { return process_->t0(); }
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace xo {
|
||||||
// realized_range() -> iterator_range<IT>
|
// realized_range() -> iterator_range<IT>
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Realization(ref::brw<StochasticProcess<T>> p) : process_{p} {}
|
Realization(bp<StochasticProcess<T>> p) : process_{p} {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* stochastic process from which this realization is sampled */
|
/* stochastic process from which this realization is sampled */
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ namespace xo {
|
||||||
<< ">";
|
<< ">";
|
||||||
} /*display*/
|
} /*display*/
|
||||||
|
|
||||||
virtual void visit_direct_consumers(std::function<void (ref::brw<xo::reactor::AbstractEventProcessor>)> const &) override {
|
virtual void visit_direct_consumers(std::function<void (bp<xo::reactor::AbstractEventProcessor>)> const &) override {
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -289,7 +289,7 @@ namespace xo {
|
||||||
|
|
||||||
// ----- Inherited from AbstractEventProcessor -----
|
// ----- Inherited from AbstractEventProcessor -----
|
||||||
|
|
||||||
virtual void visit_direct_consumers(std::function<void (ref::brw<xo::reactor::AbstractEventProcessor>)> const & fn) override {
|
virtual void visit_direct_consumers(std::function<void (bp<xo::reactor::AbstractEventProcessor>)> const & fn) override {
|
||||||
|
|
||||||
for(auto const & x : *(this->ev_sink_addr()))
|
for(auto const & x : *(this->ev_sink_addr()))
|
||||||
fn(x.fn_.borrow());
|
fn(x.fn_.borrow());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue