Re: Decision Tables



kwikius <andy@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:

<snip most of the code, but it enables this:>
int main()
{
D d1("John","Smith","England");
D d2("John","Jones","England");

typedef Dpred<&D::first_name> d_first_name;
typedef Dpred<&D::last_name> d_last_name;
typedef Dpred<&D::country> d_country;

std::cout << (d_first_name(d1,d2) && d_last_name(d1,d2) &&
d_country(d1,d2)) << '\n';

d_first_name first_name(d1,d2);
d_last_name last_name(d1,d2);
d_country country(d1,d2);

std::cout << (first_name && (last_name || country)) << '\n';
std::cout << (first_name && !last_name && country) << '\n';
}

I may be missing your point, but I *think* the OP wanted a way to
"store" (or at least represent) compound predicates which can the be
evaluated against an unknown data item. I don't think your example
shows this.

--
Ben.
.



Relevant Pages

  • Re: OT: Win 7 comments
    ... The registry is a monolithic whole. ... Lest you get the wrong idea, I should just say that this kind of thing is simply endemic on Windows. ... reinstalling the missing files, not by changing the registry at all. ...
    (comp.sys.mac.advocacy)
  • Re: observations in different scales
    ... On reporting averages... ... in the same manner that you investigate Missing - ... Where I know "Kaplan-Meier" and what I find with Google, ... [snip, brief exchange] ...
    (sci.stat.math)
  • Re: (OT)Re: US GP Refund received - new date for 2006
    ... think Frasier was missing for about 6 games too. ... >> So i've decided, that i'm just going to sit back, knock over a few ... I didn't realise the Aussie cricket team needed line backers, ...
    (rec.autos.sport.f1)
  • Re: polychoric correlations
    ... [snip, much] ... designate one variable the "exemplar." ... "missing" values. ... Two alternatives are: Substituting ...
    (sci.stat.consult)
  • Re: How do timers work?
    ... <SNIP> ... >> You are only missing one line in your pcode. ... > Supposing it's the only thread, how does the OS know to ...
    (comp.lang.java.programmer)