Ignore:
Timestamp:
Mar 10, 2007, 9:07:13 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses #193. vector now works as outlined here. Added some
functionality. Added a clone function that facilitates resizing of
vectors. clone is needed since assignement operator functionality is
changed.

File:
1 edited

Legend:

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

    r779 r789  
    3434  void convert(const DataLookup1D& lookup, utility::vector& vector)
    3535  {
    36     vector=utility::vector(lookup.size());
     36    vector.clone(utility::vector(lookup.size()));
    3737    for(u_int i=0; i<lookup.size(); i++)
    3838      vector(i)=lookup(i);
     
    4343  {
    4444   
    45     value=utility::vector(lookup.size());
    46     weight=utility::vector(lookup.size());
     45    value.clone(utility::vector(lookup.size()));
     46    weight.clone(utility::vector(lookup.size()));
    4747    for(u_int i=0; i<lookup.size(); i++){
    4848      value(i)=lookup.data(i);
Note: See TracChangeset for help on using the changeset viewer.