SGCachedVector.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  * Written (W) 2012 Fernando José Iglesias García
00008  * Written (W) 2010,2012 Soeren Sonnenburg
00009  * Copyright (C) 2010 Berlin Institute of Technology
00010  * Copyright (C) 2012 Soeren Sonnenburg
00011  */
00012 //template<class T> class SGCachedVector : public SGVector<T>
00013 //{
00014 //  public:
00015 //      /** default constructor */
00016 //      SGCachedVector(CCache<T>* c, index_t i)
00017 //          : SGVector<T>(), cache(c), idx(i)
00018 //      {
00019 //      }
00020 //
00021 //      /** constructor for setting params */
00022 //      SGCachedVector(CCache<T>* c, index_t i,
00023 //              T* v, index_t len, bool free_vec=false)
00024 //          : SGVector<T>(v, len, free_vec), cache(c), idx(i)
00025 //      {
00026 //      }
00027 //
00028 //      /** constructor to create new vector in memory */
00029 //      SGCachedVector(CCache<T>* c, index_t i, index_t len, bool free_vec=false) :
00030 //          SGVector<T>(len, free_vec), cache(c), idx(i)
00031 //      {
00032 //      }
00033 //
00034 //      /** free vector */
00035 //      virtual void free_vector()
00036 //      {
00037 //          //clean up cache fixme
00038 //          SGVector<T>::free_vector();
00039 //      }
00040 //
00041 //      /** destroy vector */
00042 //      virtual void destroy_vector()
00043 //      {
00044 //          //clean up cache fixme
00045 //          SGVector<T>::destroy_vector();
00046 //          if (cache)
00047 //              cache->unlock_entry(idx);
00048 //      }
00049 //
00050 //  public:
00051 //      /** idx */
00052 //      index_t idx;
00053 //
00054 //      /** cache */
00055 //      CCache<T>* cache;
00056 //};
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation