Commit 3ee1a1d8 authored by Maria Dimashova's avatar Maria Dimashova

fixed mistake in method name (#1798)

parent 71d7482a
......@@ -34,7 +34,7 @@ Class for loading the data from a ``.csv`` file.
void mix_train_and_test_idx();
const CvMat* get_var_idx();
void chahge_var_idx( int vi, bool state );
void change_var_idx( int vi, bool state );
const CvMat* get_var_types();
void set_var_types( const char* str );
......@@ -158,11 +158,11 @@ The method returns the indices of variables (columns) used in the ``values`` mat
It returns ``0`` if the used subset is not set. It throws an exception if the data has not been loaded from the file yet. Returned matrix is a single-row matrix of the type ``CV_32SC1``. Its column count is equal to the size of the used variable subset.
CvMLData::chahge_var_idx
CvMLData::change_var_idx
------------------------
Enables or disables particular variable in the loaded data
.. ocv:function:: void CvMLData::chahge_var_idx( int vi, bool state )
.. ocv:function:: void CvMLData::change_var_idx( int vi, bool state )
By default, after reading the data set all variables in the ``values`` matrix (see :ocv:func:`CvMLData::get_values`) are used. But you may want to use only a subset of variables and include/exclude (depending on ``state`` value) a variable with the ``vi`` index from the used subset. If the data has not been loaded from the file yet, an exception is thrown.
......
......@@ -2051,7 +2051,9 @@ public:
void mix_train_and_test_idx();
const CvMat* get_var_idx();
void chahge_var_idx( int vi, bool state ); // state == true to set vi-variable as predictor
void chahge_var_idx( int vi, bool state ); // misspelled (saved for back compitability),
// use change_var_idx
void change_var_idx( int vi, bool state ); // state == true to set vi-variable as predictor
const CvMat* get_var_types();
int get_var_type( int var_idx ) const;
......
......@@ -743,7 +743,12 @@ const CvMat* CvMLData::get_var_idx()
void CvMLData::chahge_var_idx( int vi, bool state )
{
CV_FUNCNAME( "CvMLData::get_responses_ptr" );
change_var_idx( vi, state );
}
void CvMLData::change_var_idx( int vi, bool state )
{
CV_FUNCNAME( "CvMLData::change_var_idx" );
__BEGIN__;
int var_count = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment