KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bbb_association_prior.h
Go to the documentation of this file.
1 /* =========================================================================== *
2  |
3  | Copyright (c) 1994-2011 by Kobus Barnard (author)
4  |
5  | Personal and educational use of this code is granted, provided that this
6  | header is kept intact, and that the authorship is not misrepresented, that
7  | its use is acknowledged in publications, and relevant papers are cited.
8  |
9  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
10  |
11  | Please note that the code in this file has not necessarily been adequately
12  | tested. Naturally, there is no guarantee of performance, support, or fitness
13  | for any particular task. Nonetheless, I am interested in hearing about
14  | problems that you encounter.
15  |
16  | Author: Ernesto Brau
17  * =========================================================================== */
18 
19 /* $Id$ */
20 
21 #ifndef B3_ASSOCIATION_PRIOR_H
22 #define B3_ASSOCIATION_PRIOR_H
23 
27 
28 namespace kjb {
29 namespace bbb {
30 
37 {
38 public:
40  Association_prior(const Activity_library& lib) : parent_p_(0), lib_(lib) {}
41 
43  void set_parent(const Intentional_activity& act) { parent_p_ = &act; }
44 
46  const Intentional_activity& parent() const { return *parent_p_; }
47 
49  const Activity_library& library() const { return lib_; }
50 
51 private:
52  const Intentional_activity* parent_p_;
53  const Activity_library& lib_;
54 };
55 
57 Association sample(const Association_prior& prior);
58 
59 }} // namespace kjb::bbb
60 
61 #endif /*B3_ASSOCIATION_PRIOR_H */
62 
Definition: bbb_intentional_activity.h:39
Activity_sequence sample(const As_prior &prior)
Sample an activity sequence from the given prior.
Definition: bbb_activity_sequence_prior.cpp:90
const Intentional_activity & parent() const
Get parent activity.
Definition: bbb_association_prior.h:46
const Activity_library & library() const
Get activity library.
Definition: bbb_association_prior.h:49
Definition: bbb_association_prior.h:36
Association_prior(const Activity_library &lib)
Construct an empty associaiton prior.
Definition: bbb_association_prior.h:40
void set_parent(const Intentional_activity &act)
Set parent activity.
Definition: bbb_association_prior.h:43
Definition: bbb_activity_library.h:38