Re: fuzzy object question.

From: Robert C. Martin (unclebob_at_objectmentor.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 12:07:43 -0600

On Thu, 18 Mar 2004 09:35:25 +0100, "jd"
<jedrzej_dudkiewicz@poczta.interia.pl> wrote:

>
>"Robert C. Martin" <unclebob@objectmentor.com> wrote in message

>> Fuzziness is the ability to be in more than one mutually exclusive set
>> at the same time. In a non-fuzzy world, water is either hot or cold.
>> It is either a member of the hot set, or the cold set, but not both at
>> the same time. In the fuzzy world, an instance of water might be a
>> 20% member of the cold set and an 80% member of the hot set.
>>
>> One might model this as:
>>
>> class Water {
>> public:
>> double isHot(); // returns a number between 0 and 1.
>> };
>>
>Hmm... Wouldn't it be better to return temperature and let the "peer"
>decide, whether or not it's hot ? Water don't know, if it's hot or cold, am
>I right ? Just as people don't know, if they are pretty or ugly (except of
>extreme cases, I think). Just a proposition, I'm not very good at modeling
>such things. Besides, this is what AndyW proposed between the lines, I
>think.

That depends on whether you want the members to know their membership,
or the sets to know the membership of their members. Certain
applications will want one view, others will want the other.

So you could model it this way:

public class HotWaterSet {
  public double isMember(Water w); // returns value in range [0,1]
}



Relevant Pages

  • For the careful e-writer
    ... before the arrival of the spammers and other members ... Words like water, sand, and mail are called mass nouns. ...
    (soc.retirement)
  • Re: Foolish Sando pulling himself again
    ... We have seen BSPP members let BSPP down. ... Because NLD (Daw Su) took her members or the people as water. ...
    (soc.culture.burma)
  • Re: lobbying on 15 July
    ... The onus is on the property owner to prove that all water ... into soakaways or water courses. ... free or a nominal sum because they already PI ins,or members will ...
    (uk.rec.scouting)
  • Re: ot: How stupid is your wife?
    ... "Does it go under the water?" ... "Er, yes, otherwise it'd be called the channel bridge" ... members. ... Groucho Marx ...
    (uk.rec.motorcycles)
  • Re: Please stop replying to elsiemelsi
    ... Colin wrote: ... The idea that all members of a Usenet newsgroup should agree ... about anything (even that water is wet) is utterly daft. ...
    (sci.logic)