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