Show
Ignore:
Timestamp:
08/27/09 15:39:35 (15 years ago)
Author:
smidl
Message:

redesign of ctrl LQ control for arx

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/itpp_ext.cpp

    r584 r586  
    415415} 
    416416 
    417 } 
     417ivec unique_complement (const ivec &in, const ivec &base) 
     418{ 
     419        // almost a copy of unique 
     420        ivec uniq (0); 
     421        int j = 0; 
     422        bool found = false; 
     423        for (int i = 0;i < in.length(); i++) { 
     424                found = false; 
     425                j = 0; 
     426                while ( (!found) && (j < uniq.length())) { 
     427                        if (in (i) == uniq (j)) found = true; 
     428                        j++; 
     429                } 
     430                j=0; 
     431                while ( (!found) && (j < base.length())) { 
     432                        if (in (i) == uniq (j)) found = true; 
     433                        j++; 
     434                } 
     435                if (!found) uniq = concat (uniq, in (i)); 
     436        } 
     437        return uniq; 
     438} 
     439 
     440}