Skip to content

Instantly share code, notes, and snippets.

@geektoni geektoni/SGObject_some.h

Last active May 16, 2017
What would you like to do?
#ifndef __SGOBJECT_H__
#define __SGOBJECT_H__
#include <shogun/lib/config.h>
#include <shogun/lib/common.h>
#include <shogun/lib/DataType.h>
#include <shogun/lib/ShogunException.h>
#include <shogun/base/Version.h>
#include <shogun/base/unique.h>
#include <shogun/io/SGIO.h>
#include <shogun/lib/tag.h>
#include <shogun/lib/any.h>
#include <shogun/lib/some.h>
/** \namespace shogun
* @brief all of classes and functions are contained in the shogun namespace
namespace shogun
class RefCount;
class SGIO;
class Parallel;
class Parameter;
class CSerializableFile;
class CSGObject
/** default constructor */
/** copy constructor */
CSGObject(const CSGObject& orig);
/** destructor */
virtual ~CSGObject();
virtual Some<CSGObject> shallow_copy() const;
virtual Some<CSGObject> deep_copy() const;
virtual const char* get_name() const = 0;
void set_global_io(Some<SGIO> io);
Some<SGIO> get_global_io();
void set_global_parallel(Some<Parallel> parallel);
Some<Parallel> get_global_parallel();
void set_global_version(Some<Version> version);
Some<Version> get_global_version();
virtual bool equals(const Some<CSGObject> other, float64_t accuracy=0.0, bool tolerant=false);
virtual Some<CSGObject> clone();
/** io */
Some<SGIO> io;
/** parallel */
Some<Parallel> parallel;
/** version */
Some<Version> version;
/** parameters */
Some<Parameter> m_parameters;
/** model selection parameters */
Some<Parameter> m_model_selection_parameters;
/** parameters wrt which we can compute gradients */
Some<Parameter> m_gradient_parameters;
/** Hash of parameter values*/
uint32_t m_hash;
EPrimitiveType m_generic;
bool m_load_pre_called;
bool m_load_post_called;
bool m_save_pre_called;
bool m_save_post_called;
#endif // __SGOBJECT_H__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.