示例#1
0
void OrganizedData::load(vs dataset)
{
    train.load   (dataset[0].c_str(),auto_detect);
    test.load    (dataset[1].c_str(),auto_detect);
    support.load (dataset[2].c_str(),auto_detect);
    hyper->load  (dataset[3].c_str());

    nBlock      = train.n_rows;
    nSupport    = getxm().n_rows;

    for (int i = 0; i < nBlock; i++)
    {
        nDim    = getxb(i).n_cols;
        nTrain += getxb(i).n_rows;
        nTest  += getxt(i).n_rows;
    }
}
示例#2
0
// Public interface:
Rectangle& Rectangle::setintersect(const Rectangle& r )
{
    setxa( max( r.getxa(), getxa() ) );
    setya( max( r.getya(), getya() ) );
    setyb( min( r.getyb(), getyb() ) );
    setxb( min( r.getxb(), getxb() ) );

    return *this;
}