31
#ifndef OPENCV_FLANN_DATASET_H_
32
#define OPENCV_FLANN_DATASET_H_
56
Matrix() : rows(0), cols(0), stride(0), data(NULL)
60
Matrix(T* data_,
size_t
rows_,
size_t
cols_,
size_t
stride_ = 0) :
61
rows(rows_), cols(cols_), stride(stride_), data(data_)
63
if
(stride==0) stride = cols;
69
CV_DEPRECATED
void
free()
71
fprintf(stderr,
"The cvflann::Matrix<T>::free() method is deprecated "
72
"and it does not do any memory deallocation any more. You are"
73
"responsible for deallocating the matrix memory (by doing"
74
"'delete[] matrix.data' for example)");
80
T* operator[](
size_t
index)
const
82
return
data+index*stride;
93
flann_datatype_t type;
95
UntypedMatrix(
void* data_,
long
rows_,
long
cols_) :
96
rows(rows_), cols(cols_), data(data_)
108
return
Matrix<T>((T*)data, rows, cols);