common-pattern.hh
Go to the documentation of this file.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
Definition core.hpp:3373
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Definition core.hpp:5080
T * alloc(long unsigned int n)
Allocate block of n objects of type T from region.
Definition region.hpp:386
Immutable input, with dense ranks internally and original IDs externally.
Definition common-pattern.hh:121
int support(const std::vector< int > &pattern) const
Count supporting records, rather than embeddings within a record.
Definition common-pattern.hh:191
IntSharedArray last_positions
Each item's last position per record, in decreasing position order.
Definition common-pattern.hh:130
int cached_prefix
Prefix length at which the item filter and length bound were computed.
Definition common-pattern.hh:329
OpenProjection(Home home, OpenViewList< Int::IntView > pattern, const Database &database, int support, IntVar count)
Definition common-pattern.hh:331
size_t dispose(Space &home) override
Delete actor and return its size.
Definition common-pattern.hh:417
OpenProjection(Space &home, OpenProjection &p)
Definition common-pattern.hh:344
PropCost cost(const Space &, const ModEventDelta &) const override
Cost function.
Definition common-pattern.hh:359
OpenViewList< Int::IntView > list
Definition common-pattern.hh:321
static void post(Home home, OpenViewList< Int::IntView > pattern, const Database &database, int support, IntVar count)
Definition common-pattern.hh:432
ExecStatus propagate(Space &home, const ModEventDelta &) override
Propagation function.
Definition common-pattern.hh:371
Suffixes of records supporting the assigned pattern prefix.
Definition common-pattern.hh:215
Projection(Space &home, const Database &database, int support)
Definition common-pattern.hh:227
Projection(Space &home, const Projection &p)
Definition common-pattern.hh:234
bool advance(int item)
Extend the prefix by one item and report whether enough records support it.
Definition common-pattern.hh:241
int remaining(Region ®ion) const
The threshold-th largest suffix length bounds every frequent extension.
Definition common-pattern.hh:292
IntSet frequent(Region ®ion) const
Items occurring in at least threshold supporting suffixes.
Definition common-pattern.hh:269
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
Definition core.hpp:4321
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Definition macros.hpp:52
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value).
Definition var-type.hpp:90
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:99
Gecode toplevel namespace
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition count.cpp:40
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition sequence.cpp:47
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
Definition int.hh:1813
void values(Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF)
Post constraint .
Definition aliases.hpp:143
Definition common-pattern.hh:23
std::vector< int > read_sequence(const std::string &line, Format format)
Read positive integer items or A..Z (represented by item IDs 1..26).
Definition common-pattern.hh:33
int minimum_support(const std::string &percent, int sequences)
Round the support percentage (at most six decimals) up to a record count.
Definition common-pattern.hh:97
IntVar frequent(Home home, OpenIntVarList pattern, const Database &database, int support)
Enforce minimum support and return its exact count when the pattern is complete.
Definition common-pattern.hh:440
REG language(Language name, const Database &database)
Built-in motif and benchmark languages described in CommonPattern.
Definition common-pattern.hh:456
Sequences read_database(std::istream &stream, Format format)
Read one sequence per line, counting duplicate rows as distinct records.
Definition common-pattern.hh:79
