home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.ai.fuzzy      Fuzzy logic... all warm and fuzzy-like      1,275 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 670 of 1,275   
   Dmitry A. Kazakov to Evyn   
   Re: Fuzzy Union in C++   
   18 Jan 07 14:13:50   
   
   From: mailbox@dmitry-kazakov.de   
      
   On 18 Jan 2007 04:34:16 -0800, Evyn wrote:   
      
   > What is the best way to implement a union for fuzzy sets in C++?   
      
   That depends on the representation of. Which in turn depends on the domain   
   set of the fuzzy sets. Is it discrete, continuous etc? Which classes or   
   membership functions are supported?   
      
   > I have   
   > used the following code for crisp sets, but the trick to converting it   
   > for fuzzy sets eludes me.   
   >   
   >  std::set_union(vec1.begin(), vec1.end(), vec2.begin(), vec2.end(),   
   >     std::back_inserter >(vec3));   
   >     sort (vec3.begin (), vec3.end (), less  ());   
      
   That STL-stuff lets me assume a continuous domain of singletons and sets   
   implemented as ordered STL-sets. Staying by STL you would need ordered maps   
   instead. Then you would do a union of two maps. The new map shall for each   
   key existing in   
      
   1. exactly one of the maps: place the key into the result map with the same   
   value (=of membership function).   
      
   2. in both of the maps: place the key with max of the values of.   
      
   (Sorry for not being more specific, I don't use STL)   
      
   --   
   Regards,   
   Dmitry A. Kazakov   
   http://www.dmitry-kazakov.de   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca