/usr/include/shogun/lib/IndexBlock.h is in libshogun-dev 3.2.0-7.5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Copyright (C) 2012 Sergey Lisitsyn
*/
#ifndef INDEXBLOCK_H_
#define INDEXBLOCK_H_
#include <shogun/lib/SGVector.h>
#include <shogun/lib/List.h>
namespace shogun
{
/** @brief class IndexBlock used to represent
* contiguous indices of one group (e.g. block of related features)
*/
class CIndexBlock : public CSGObject
{
public:
/** default constructor */
CIndexBlock();
/** constructor
* @param min_index smallest index of the index block
* @param max_index largest index of the index block
* @param weight weight (optional)
* @param name name of task (optional)
*/
CIndexBlock(index_t min_index, index_t max_index,
float64_t weight=1.0, const char* name="task");
/** destructor */
~CIndexBlock();
/** get min index */
index_t get_min_index() const { return m_min_index; }
/** set max index */
void set_min_index(index_t min_index) { m_min_index = min_index; }
/** get min index */
index_t get_max_index() const { return m_max_index; }
/** set max index */
void set_max_index(index_t max_index) { m_max_index = max_index; }
/** get weight */
float64_t get_weight() const { return m_weight; }
/** set weight */
void set_weight(float64_t weight) { m_weight = weight; }
/** get name */
virtual const char* get_name() const { return "IndexBlock"; };
/** get subtasks */
CList* get_sub_blocks();
/** get num subtasks */
int32_t get_num_sub_blocks();
/** adds sub-block
* @param sub_block subtask to add
*/
void add_sub_block(CIndexBlock* sub_block);
private:
/** min index */
index_t m_min_index;
/** max index */
index_t m_max_index;
/** weight */
float64_t m_weight;
/** subtasks */
CList* m_sub_blocks;
};
}
#endif
|