19 template<
typename... feature_t>
60 auto operator<=>(
const Object& o)
const {
71 template<
typename... T>
77 (ret.set( static_cast<T>(
myrandom(static_cast<int>(T::__count))) ),
88 std::string out =
"[Object";
89 (out +=
str((
int)get<feature_t>()), ...);
96 template<
typename... feature_t>
T myrandom(T max)
Definition: Random.h:176
std::ostream & operator<<(std::ostream &o, const Object< feature_t... > &t)
Definition: Object.h:97
Object(int __nothing=0)
Definition: Object.h:28
std::string str(BindingTree *t)
Definition: BindingTree.h:195
bool is(t v) const
Check if this feature dimension is a given value.
Definition: Object.h:56
Object(feature_t... types)
Definition: Object.h:30
static Object< feature_t... > sample()
Definition: Object.h:83
static Object< T... > __sample()
Sample a uniformly random object. This requires our features to end in __count.
Definition: Object.h:72
This is a thread_local rng whose first object is used to see others (in other threads). This way, we can have thread_local rngs that all are seeded deterministcally in Fleet via –seed=X.
bool operator==(const Object &o) const
Definition: Object.h:64
std::string string() const
Definition: Object.h:87
std::tuple< feature_t... > feature
Definition: Object.h:21