Skip to content

Instantly share code, notes, and snippets.

@geektoni
Created July 18, 2017 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geektoni/52f1f208bc7c0fcf7825f63743e6bed9 to your computer and use it in GitHub Desktop.
Save geektoni/52f1f208bc7c0fcf7825f63743e6bed9 to your computer and use it in GitHub Desktop.
// Main class (represents a single observed value)
class ObservedValue : public CSGObject
{
ObservedValue();
ObservedValue(int64_t step, std::string name, Any v);
~ObservedValue();
int64_t get_step();
std::string get_name();
Any get_value();
char * get_name() const
{
return "ObservedValue";
}
protected:
int64_t step;
std::string name;
Any value;
};
// ObservedValue which store CrossValidation types
class CrossValidationObservedValue() : public ObservedValue
{
// Cross Validation specific values
}
class CSGObject
{
.....
void observe(ObservedValue& value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment