Generated on for Gecode by doxygen 1.17.0

Cutoff sequence shared by the assets of a portfolio. More...

#include <gecode/search/pbs.hpp>

Public Member Functions

 PbsCutoffs (Cutoff *c0)
 Initialize for cutoff c0 with the reference held while building.

Static Public Member Functions

static void release (PbsCutoffs *s)
 Release a reference.
Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
static void operator delete (void *p)
 Free memory allocated from heap.

Public Attributes

Support::Mutex m
 Mutex protecting the sequence, assets can run in parallel.
Cutoff * c
 The shared cutoff sequence.
unsigned int n
 Number of references.
bool owner
 Whether the cutoff sequence is disposed with the last reference.

Detailed Description

Cutoff sequence shared by the assets of a portfolio.

A cutoff cannot be copied, so the assets of a portfolio that each take ownership of a cutoff get a PbsCutoff each, drawing from one sequence. The sequence is disposed with the last PbsCutoff and the reference held while the portfolio is built. The original cutoff is disposed as well only if building has succeeded, otherwise it stays with the caller.

Definition at line 142 of file pbs.hpp.

Constructor & Destructor Documentation

◆ PbsCutoffs()

Gecode::Search::PbsCutoffs::PbsCutoffs ( Cutoff * c0)
inline

Initialize for cutoff c0 with the reference held while building.

Definition at line 153 of file pbs.hpp.

Member Function Documentation

◆ release()

void Gecode::Search::PbsCutoffs::release ( PbsCutoffs * s)
inlinestatic

Release a reference.

Definition at line 155 of file pbs.hpp.

Member Data Documentation

◆ m

Support::Mutex Gecode::Search::PbsCutoffs::m

Mutex protecting the sequence, assets can run in parallel.

Definition at line 145 of file pbs.hpp.

◆ c

Cutoff* Gecode::Search::PbsCutoffs::c

The shared cutoff sequence.

Definition at line 147 of file pbs.hpp.

◆ n

unsigned int Gecode::Search::PbsCutoffs::n

Number of references.

Definition at line 149 of file pbs.hpp.

◆ owner

bool Gecode::Search::PbsCutoffs::owner

Whether the cutoff sequence is disposed with the last reference.

Definition at line 151 of file pbs.hpp.


The documentation for this class was generated from the following file: