TaskTree.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Copyright (C) 2012 Sergey Lisitsyn
00008  */
00009 
00010 #ifndef TASKTREE_H_
00011 #define TASKTREE_H_
00012 
00013 #include <shogun/transfer/multitask/Task.h>
00014 #include <shogun/transfer/multitask/TaskRelation.h>
00015 
00016 namespace shogun
00017 {
00018 
00025 class CTaskTree : public CTaskRelation
00026 {
00027 public:
00028 
00030     CTaskTree();
00031 
00035     CTaskTree(CTask* root_task);
00036 
00038     virtual ~CTaskTree();
00039 
00041     virtual SGVector<index_t>* get_tasks_indices() const;
00042 
00047     virtual int32_t get_num_tasks() const;
00048 
00054     SGVector<float64_t> get_SLEP_ind_t();
00055 
00060     CTask* get_root_task() const { SG_REF(m_root_task); return m_root_task; }
00061 
00066     void set_root_task(CTask* root_task) { SG_REF(root_task); SG_UNREF(m_root_task); m_root_task = root_task; }
00067 
00072     const char* get_name() const { return "TaskTree"; };
00073 
00078     ETaskRelationType get_relation_type() const { return TASK_TREE; }
00079 
00080 protected:
00081 
00083     CTask* m_root_task;
00084 
00085 };
00086 
00087 }
00088 #endif
00089 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation