Ignore:
Timestamp:
Feb 23, 2008, 11:52:43 PM (14 years ago)
Author:
Peter
Message:

using Index class instead of std::vector<size_t>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/FeatureSelectorIR.cc

    r1000 r1134  
    6464    assert(data.columns()==target.size());
    6565    InputRanker ir = InputRanker(data, target, score_);
    66     features_.resize(N_);
     66    std::vector<size_t>* features = new std::vector<size_t>(N_);
    6767    std::copy(ir.id().begin()+first_, ir.id().begin()+first_+N_,
    68               features_.begin());
     68              features->begin());
     69    features_ =
     70      utility::Index(utility::SmartPtr<const std::vector<size_t> >(features));
    6971  }
    7072
     
    7577    assert(data.columns()==target.size());
    7678    InputRanker ir = InputRanker(data, target, score_);
    77     features_.resize(N_);
     79    std::vector<size_t>* features = new std::vector<size_t>(N_);
    7880    std::copy(ir.id().begin()+first_, ir.id().begin()+first_+N_,
    79               features_.begin());
    80    
     81              features->begin());
     82    features_ =
     83      utility::Index(utility::SmartPtr<const std::vector<size_t> >(features));
    8184  }
    8285
Note: See TracChangeset for help on using the changeset viewer.