src/FitnessFunctions.cpp
void EchoBay::Comparator::one_hot_encoding(Eigen::Ref<MatrixBO> Dst, MatrixBO Src)
{
    int k;
    int len = Src.rows();

    // Reset matrix
    Dst.setZero();
    // Assign encoding
    for (int i = 0; i < len; ++i)
    {
        k = (int)Src(i);
        Dst(i, k) = 1;
    }
}
/**
 * @brief Transform linear labeling in one-hot encoding format
 * 
 * @param Dst Encoding destination matrix
 * @param Src Input source label
 */
@brief Transform linear labeling in one-hot encoding format

@param Dst Encoding destination matrix
@param Src Input source label
@brief Transform linear labeling in one - hot encoding format @param Dst Encoding destination matrix @param Src Input source label
void EchoBay::Comparator::one_hot_encoding(Eigen::Ref<MatrixBO> Dst, MatrixBO Src)
{
    int k;
    int len = Src.rows();
    Dst.setZero();
    for (int i = 0; i < len; ++i)
    {
        k = (int)Src(i);
        Dst(i, k) = 1;
    }
}
void EchoBay :: Comparator :: one_hot_encoding ( Eigen :: Ref < MatrixBO > Dst , MatrixBO Src ) { int k ; int len = Src . rows ( ) ; Dst . setZero ( ) ; for ( int i = 0 ; i < len ; ++ i ) { k = ( int ) Src ( i ) ; Dst ( i , k ) = 1 ; } }
@brief Transform linear labeling in one-hot encoding format
@brief Transform linear labeling in one - hot encoding format
// Reset matrix // Assign encoding