3#ifndef SI_LEARNABLE_DBLEARNABLE_H
4#define SI_LEARNABLE_DBLEARNABLE_H
31 DBLearnable(
double *X,
double *Y,
char *INF, std::vector<int> &dims,
45 if (
this == &db)
return *
this;
70 inline double *
getX()
const {
return _X; };
71 inline double *
getY()
const {
return _Y; };
93 std::vector<std::string>::const_iterator il, el;
96 for (il = labels.begin(), el = labels.end();
97 il != el; ++il, ++ind)
124 std::vector<int> &dims,
bool owned_data) :
125 DBLearnable(X, Y, INF, dims, owned_data), _cycles(0) {};
132 inline void setSplit(
int split) { _split = split; };
133 inline void setCycles(
int cycles) { _cycles = cycles; };
double * _Y
Y data matrix.
DBLearnable(const DBLearnable &db)
const std::vector< int > & getColsNumber() const
void setLabels(std::vector< std::string > &labels)
DBLearnable(double *X, double *Y, char *INF, std::vector< int > &dims, bool owned_data)
Create DBLearnable from arrays and dims.
unsigned int getIndiceFromLabel(std::string &label) const
int getINFcolsNumber() const
double * getX() const
Accessors :
int getYcolsNumber() const
int _size
number of vectors
DBLearnable & operator=(const DBLearnable &db)
int getXcolsNumber() const
char * _INF
meta information data matrix
std::map< std::string, unsigned int > _labels_to_indices
info labels -> indices
DBVectorLearnable * operator[](unsigned int ind) const
double * _X
X data matrix.
bool _owned_data
data are owned by database
std::vector< int > _cols_numbers
number of columns (X, Y, INF)
void setSplit(int split)
Accessors.
SiVectorLearnable * operator[](unsigned int ind) const
void setCycles(int cycles)
SiDBLearnable(double *X, double *Y, char *INF, std::vector< int > &dims, bool owned_data)
Specialization for sigraph : Y as only one dim.