Generated on for Gecode by doxygen 1.17.0
Gecode::Int::Extensional::OpenRegular< View, pc > Class Template Reference

Regular-language filtering over an open list's materialized prefix. More...

#include <gecode/int/extensional/open.hpp>

Public Member Functions

virtual Actor * copy (Space &home)
 Create copy.
virtual PropCost cost (const Space &, const ModEventDelta &) const
 Cost function.
virtual void reschedule (Space &home)
 Schedule function.
virtual ExecStatus propagate (Space &home, const ModEventDelta &)
 Propagation function.
virtual size_t dispose (Space &home)
 Delete actor and return its size.
ModEventDelta modeventdelta (void) const
 Return the modification event delta.
virtual ExecStatus advise (Space &home, Advisor &a, const Delta &d)
 Advise function.
virtual void advise (Space &home, Advisor &a)
 Run advisor a to be run on failure in failed space.
double afc (void) const
 Return the accumulated failure count.
unsigned int id (void) const
 Return propagator id.
PropagatorGroup group (void) const
 Return group propagator belongs to.
void group (PropagatorGroup g)
 Add propagator to group g.
bool disabled (void) const
 Whether propagator is currently disabled.
virtual ~Actor (void)
 To avoid warnings.

Static Public Member Functions

static ExecStatus post (Home home, OpenViewList< View > list, DFA dfa)
static void * operator new (size_t s, Space &home)
 Allocate memory from space.
static void operator delete (void *p, Space &home)
 No-op for exceptions.
static void * operator new (size_t s)
 Not used.
static void operator delete (void *p)
 Not used.

Protected Member Functions

 OpenRegular (Home home, OpenViewList< View > list0, DFA dfa0)
 OpenRegular (Space &home, OpenRegular &p)
bool has_accepting_suffix (const unsigned char *reachable, int remaining) const
Protected Member Functions inherited from Gecode::Propagator
 Propagator (Home home)
 Constructor for posting.
 Propagator (Space &home, Propagator &p)
 Constructor for cloning p.
Propagator * fwd (void) const
 Return forwarding pointer during copying.
Kernel::GPI::Info & gpi (void)
 Provide access to propagator information.

Protected Attributes

OpenViewList< View > list
IntView length
DFA dfa
SharedArray< int > distance
unsigned char * start
int offset
int subscribed

Detailed Description

template<class View, PropCond pc>
class Gecode::Int::Extensional::OpenRegular< View, pc >

Regular-language filtering over an open list's materialized prefix.

start contains the states reachable after the assigned positions before offset. Forward and backward support are recomputed from offset to the end of the prefix. The last layer needs an accepting continuation of at most length.max()-list.known_length() symbols. A closed list must end in an accepting state. Assigned leading positions are then folded into start, keeping every supported state for nondeterministic transitions.

Definition at line 99 of file open.hpp.

Constructor & Destructor Documentation

◆ OpenRegular() [1/2]

template<class View, PropCond pc>
Gecode::Int::Extensional::OpenRegular< View, pc >::OpenRegular ( Home home,
OpenViewList< View > list0,
DFA dfa0 )
inlineprotected

Definition at line 109 of file open.hpp.

◆ OpenRegular() [2/2]

template<class View, PropCond pc>
Gecode::Int::Extensional::OpenRegular< View, pc >::OpenRegular ( Space & home,
OpenRegular< View, pc > & p )
inlineprotected

Definition at line 127 of file open.hpp.

Member Function Documentation

◆ has_accepting_suffix()

template<class View, PropCond pc>
bool Gecode::Int::Extensional::OpenRegular< View, pc >::has_accepting_suffix ( const unsigned char * reachable,
int remaining ) const
inlineprotected

Definition at line 138 of file open.hpp.

◆ copy()

template<class View, PropCond pc>
virtual Actor * Gecode::Int::Extensional::OpenRegular< View, pc >::copy ( Space & home)
inlinevirtual

Create copy.

Implements Gecode::Actor.

Definition at line 184 of file open.hpp.

◆ cost()

template<class View, PropCond pc>
virtual PropCost Gecode::Int::Extensional::OpenRegular< View, pc >::cost ( const Space & home,
const ModEventDelta & med ) const
inlinevirtual

Cost function.

Implements Gecode::Propagator.

Definition at line 189 of file open.hpp.

◆ reschedule()

template<class View, PropCond pc>
virtual void Gecode::Int::Extensional::OpenRegular< View, pc >::reschedule ( Space & home)
inlinevirtual

Schedule function.

The function is executed when a propagator is enabled again. Note that a propagator should be scheduled with the right modification event delta and should only be scheduled if it is legal to execute the propagator.

Implements Gecode::Propagator.

Definition at line 194 of file open.hpp.

◆ propagate()

template<class View, PropCond pc>
virtual ExecStatus Gecode::Int::Extensional::OpenRegular< View, pc >::propagate ( Space & home,
const ModEventDelta & med )
inlinevirtual

Propagation function.

The propagation function must return an execution status as follows:

  • ES_FAILED: the propagator has detected failure
  • ES_NOFIX: the propagator has done propagation
  • ES_FIX: the propagator has done propagation and has computed a fixpoint. That is, running the propagator immediately again will do nothing.

Apart from the above values, a propagator can return the result from calling one of the functions defined by a space:

  • ES_SUBSUMED: the propagator is subsumed and has been already deleted.
  • ES_NOFIX_PARTIAL: the propagator has consumed some of its propagation events.
  • ES_FIX_PARTIAL: the propagator has consumed some of its propagation events and with respect to these events is at fixpoint For more details, see the individual functions.

Implements Gecode::Propagator.

Definition at line 203 of file open.hpp.

◆ dispose()

template<class View, PropCond pc>
virtual size_t Gecode::Int::Extensional::OpenRegular< View, pc >::dispose ( Space & home)
inlinevirtual

Delete actor and return its size.

Reimplemented from Gecode::Actor.

Definition at line 292 of file open.hpp.

◆ post()

template<class View, PropCond pc>
ExecStatus Gecode::Int::Extensional::OpenRegular< View, pc >::post ( Home home,
OpenViewList< View > list,
DFA dfa )
inlinestatic

Definition at line 309 of file open.hpp.

Member Data Documentation

◆ list

template<class View, PropCond pc>
OpenViewList<View> Gecode::Int::Extensional::OpenRegular< View, pc >::list
protected

Definition at line 101 of file open.hpp.

◆ length

template<class View, PropCond pc>
IntView Gecode::Int::Extensional::OpenRegular< View, pc >::length
protected

Definition at line 102 of file open.hpp.

◆ dfa

template<class View, PropCond pc>
DFA Gecode::Int::Extensional::OpenRegular< View, pc >::dfa
protected

Definition at line 103 of file open.hpp.

◆ distance

template<class View, PropCond pc>
SharedArray<int> Gecode::Int::Extensional::OpenRegular< View, pc >::distance
protected

Definition at line 104 of file open.hpp.

◆ start

template<class View, PropCond pc>
unsigned char* Gecode::Int::Extensional::OpenRegular< View, pc >::start
protected

Definition at line 105 of file open.hpp.

◆ offset

template<class View, PropCond pc>
int Gecode::Int::Extensional::OpenRegular< View, pc >::offset
protected

Definition at line 106 of file open.hpp.

◆ subscribed

template<class View, PropCond pc>
int Gecode::Int::Extensional::OpenRegular< View, pc >::subscribed
protected

Definition at line 107 of file open.hpp.


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